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
Click to show internal directories.
Click to hide internal directories.