Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubmitVAAToContract ¶
func SubmitVAAToContract( ctx context.Context, logger *zap.Logger, wormchainConn GatewayRelayerWormchainConn, v2p *VaaToPublish, ) (*sdktx.BroadcastTxResponse, error)
SubmitVAAToContract submits a VAA to the smart contract on wormchain.
Types ¶
type GatewayRelayer ¶
type GatewayRelayer struct {
// contains filtered or unexported fields
}
GatewayRelayer is the object that manages the interface to the wormchain accountant smart contract.
func NewGatewayRelayer ¶
func NewGatewayRelayer( ctx context.Context, logger *zap.Logger, ibcTranslatorAddress string, wormchainConn GatewayRelayerWormchainConn, 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 GatewayRelayerWormchainConn ¶
type GatewayRelayerWormchainConn 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 wormchain accountant smart contract.
Click to show internal directories.
Click to hide internal directories.