helpers

package
v0.0.0-...-eab7081 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallAnnounceMsg

func CallAnnounceMsg(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName, hexValAddr, storageLoc, hexValSig string) []byte

simd tx hyperlane-announce announce <hex-validator-address> <storageLocation> <hex-validator-signature>

func CallCreateIgp

func CallCreateIgp(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName, beneficiary string) (stdout []byte)

simd tx hyperlane-igp createigp <beneficiary>

func CallCreateOracle

func CallCreateOracle(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
	keyName,
	oracleAddr string,
	igpId string,
	remoteDomain string,
) (stdout []byte)

simd tx hyperlane-igp createoracle <oracle-addr> <igp-id> <remote-domain>

func CallPayForGasMsg

func CallPayForGasMsg(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName, msgId, domain, destGas, igpId, maxPayment string) (stdout []byte)

simd tx hyperlane-igp msgpay <message-id> <destination-domain> <destination-gas-amount> <igp-id> <max-payment>

func CallProcessMsg

func CallProcessMsg(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName string, metadata string, message string) []byte

simd tx hyperlane-mailbox process <metadata> <message>

func CallSetGasPriceMsg

func CallSetGasPriceMsg(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
	keyName,
	igpId,
	domain,
	gasPrice,
	exchRate string,
) (stdout []byte)

simd tx hyperlane-igp setgasprice <igp-id> <remote-domain> <gas-price> <exch-rate>

func CreateCustomIsm

func CreateCustomIsm(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName string, counterChain *counterchain.CounterChain) uint32

func GetDefaultIsms

func GetDefaultIsms(counterChains ...*counterchain.CounterChain) (isms []*ismtypes.DefaultIsm)

func GetEventAttribute

func GetEventAttribute(events []comettypes.Event, eventType string, attributeKey string) (attrVal string, found bool)

func GetEvents

func GetEvents(c *cosmos.CosmosChain, txHash string) ([]comettypes.Event, error)

func GetMailboxAddress

func GetMailboxAddress() (string, []byte)

func GetTransaction

func GetTransaction(c *cosmos.CosmosChain, txHash string) (*sdk.TxResponse, error)

func HasEvent

func HasEvent(ctx context.Context, c *cosmos.CosmosChain, eventName string, attrKey string, attrVal string, height uint64) (bool, error)

func ParseEnvVar

func ParseEnvVar(envVar, key string) (value string)

func ParseQueryDomain

func ParseQueryDomain(input string) (domain string)

func ParseQueryTreeMetadata

func ParseQueryTreeMetadata(input string) (root string, count string)

func ParseQuoteGasPayment

func ParseQuoteGasPayment(input string) (amount, denom string)

func ParseTxHash

func ParseTxHash(input string) string

func QueryAnnouncedStorageLocations

func QueryAnnouncedStorageLocations(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
	validator string,
) (stdout []byte)

simd query hyperlane-announce getAnnouncedStorageLocations

func QueryAnnouncedValidators

func QueryAnnouncedValidators(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
) (stdout []byte)

simd query hyperlane-announce getAnnouncedValidators

func QueryCurrentTree

func QueryCurrentTree(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
) (stdout []byte)

simd query hyperlane-mailbox tree

func QueryCurrentTreeMetadata

func QueryCurrentTreeMetadata(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
) (stdout []byte)

simd query hyperlane-mailbox tree

func QueryCustomIsm

func QueryCustomIsm(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, ismId uint32) *ismtypes.QueryCustomIsmResponse

func QueryDomain

func QueryDomain(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
) (stdout []byte)

simd query hyperlane-mailbox domain

func QueryMsgDelivered

func QueryMsgDelivered(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
	msgId string,
) bool

simd query hyperlane-mailbox delivered

func QueryQuoteGasPayment

func QueryQuoteGasPayment(
	t *testing.T,
	ctx context.Context,
	chain *cosmos.CosmosChain,
	keyName,
	igpId,
	domain,
	gasAmount string,
) (stdout []byte)

simd query hyperlane-igp setgasprice <igp-id> <remote-domain> <gas-price> <exch-rate>

func QueryRecipientsIsmId

func QueryRecipientsIsmId(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, recipient string) uint32

func SetContractsIsm

func SetContractsIsm(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, contractAddr string, ismId uint32)

func SetDefaultIsm

func SetDefaultIsm(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyName string, counterChains ...*counterchain.CounterChain)

func SetupContract

func SetupContract(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, keyname string, fileLoc string, message string) (codeId, contract string)

func VerifyAnnounceEvents

func VerifyAnnounceEvents(c *cosmos.CosmosChain, txHash string) (storageLocation, validatorAddr string, err error)

func VerifyCreateOracleEvents

func VerifyCreateOracleEvents(c *cosmos.CosmosChain, txHash string) (oracleAddr string, err error)

func VerifyDispatchEvents

func VerifyDispatchEvents(c *cosmos.CosmosChain, txHash string) (destDomain, recipientAddress, msgBody, dispatchId, sender, hyperlaneMsg string, err error)

func VerifyIgpEvents

func VerifyIgpEvents(c *cosmos.CosmosChain, txHash string) (igpId uint32, err error)

func VerifyPayForGasEvents

func VerifyPayForGasEvents(c *cosmos.CosmosChain, txHash string) (msgId string, payment string, gasAmount string, err error)

func VerifyProcessEvents

func VerifyProcessEvents(c *cosmos.CosmosChain, txHash string) (msgId string, err error)

func VerifySetGasPriceEvents

func VerifySetGasPriceEvents(c *cosmos.CosmosChain, txHash string) (remoteDomain string, exchRate string, gasPrice string, err error)

Types

type ChangeContractOwner

type ChangeContractOwner struct {
	NewOwner string `json:"new_owner"`
}

type DispatchMsg

type DispatchMsg struct {
	DestinationAddr uint32 `json:"destination_domain"`
	RecipientAddr   string `json:"recipient_address"`
	MessageBody     string `json:"message_body"`
}

type ExecuteMsg

type ExecuteMsg struct {
	DispatchMsg         *DispatchMsg         `json:"dispatch_msg,omitempty"`
	ProcessMsg          *ProcessMsg          `json:"process_msg,omitempty"`
	ChangeContractOwner *ChangeContractOwner `json:"change_contract_owner,omitempty"`
	SetIsmId            *SetIsmId            `json:"set_ism_id,omitempty"`
}

type ExecuteRsp

type ExecuteRsp struct{}

type ProcessMsg

type ProcessMsg struct {
	Msg string `json:"msg"`
}

type QueryMsg

type QueryMsg struct {
	Owner *struct{} `json:"owner,omitempty"`
}

EntryPoint

type QueryRsp

type QueryRsp struct {
	Data *QueryRspObj `json:"data,omitempty"`
}

type QueryRspObj

type QueryRspObj struct {
	Address string `json:"address,omitempty"`
}

type SetIsmId

type SetIsmId struct {
	IsmId uint32 `json:"ism_id"`
}

Jump to

Keyboard shortcuts

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