contractgateway

package
v0.0.0-...-d3d27b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CobraInitContractGateway

func CobraInitContractGateway(cmd *cobra.Command, conf *SmartContractGatewayConf)

CobraInitContractGateway standard naming for contract gateway command params

Types

type REST2EthAsyncDispatcher

type REST2EthAsyncDispatcher interface {
	DispatchMsgAsync(ctx context.Context, msg map[string]interface{}, ack, immediateReceipt bool) (messages.WebhookReply, int, error)
}

REST2EthAsyncDispatcher is passed in to process messages over a streaming system with a receipt store. Only used for POST methods, when fly-sync is not set to true

type SmartContractGateway

type SmartContractGateway interface {
	PreDeploy(msg *messages.DeployContract) error
	PostDeploy(msg *messages.TransactionReceipt) error
	AddRoutes(router *httprouter.Router)
	SendReply(message interface{})
	Shutdown()
}

SmartContractGateway provides gateway functions for OpenAPI 2.0 processing of Solidity contracts

func NewSmartContractGateway

func NewSmartContractGateway(conf *SmartContractGatewayConf, txnConf *tx.TxnProcessorConf, rpc eth.RPCClient, processor tx.TxnProcessor, asyncDispatcher REST2EthAsyncDispatcher, ws ws.WebSocketChannels) (SmartContractGateway, error)

NewSmartContractGateway constructor

type SmartContractGatewayConf

type SmartContractGatewayConf struct {
	events.SubscriptionManagerConf
	StoragePath    string                              `json:"storagePath"`
	BaseURL        string                              `json:"baseURL"`
	RemoteRegistry contractregistry.RemoteRegistryConf `json:"registry,omitempty"` // JSON only config - no commandline
}

SmartContractGatewayConf configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL