Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubmitVAAToContract ¶
func SubmitVAAToContract( ctx context.Context, logger *zap.Logger, deltachainConn GatewayRelayerDeltachainConn, v2p *VaaToPublish, ) (*sdktx.BroadcastTxResponse, error)
SubmitVAAToContract submits a VAA to the smart contract on deltachain.
Types ¶
type GatewayRelayer ¶
type GatewayRelayer struct {
// contains filtered or unexported fields
}
GatewayRelayer is the object that manages the interface to the deltachain accountant smart contract.
func NewGatewayRelayer ¶
func NewGatewayRelayer( ctx context.Context, logger *zap.Logger, ibcTranslatorAddress string, deltachainConn GatewayRelayerDeltachainConn, env common.Environment, ) *GatewayRelayer
NewGatewayRelayer creates a new instance of the GatewayRelayer object.
func (*GatewayRelayer) Close ¶
func (gwr *GatewayRelayer) Close()
Close closes the connection to the smart contract.
func (*GatewayRelayer) Start ¶
func (gwr *GatewayRelayer) Start(ctx context.Context) error
Start initializes the gateway relayer and starts the worker runnable that submits VAAs to the contract.
func (*GatewayRelayer) SubmitVAA ¶
func (gwr *GatewayRelayer) SubmitVAA(v *vaa.VAA)
SubmitVAA checks to see if the VAA should be submitted to the smart contract, and if so, writes it to the channel for publishing.
type GatewayRelayerDeltachainConn ¶
type GatewayRelayerDeltachainConn interface { Close() SenderAddress() string SubmitQuery(ctx context.Context, contractAddress string, query []byte) ([]byte, error) SignAndBroadcastTx(ctx context.Context, msg sdktypes.Msg) (*sdktx.BroadcastTxResponse, error) BroadcastTxResponseToString(txResp *sdktx.BroadcastTxResponse) string }
type VaaToPublish ¶
GatewayRelayer is the object that manages the interface to the deltachain accountant smart contract.
Click to show internal directories.
Click to hide internal directories.