Documentation ¶
Index ¶
- type ContractConfig
- type TestChain
- func (chain *TestChain) CallOpts(ctx context.Context, index uint32) *bind.CallOpts
- func (chain *TestChain) ChainID() string
- func (chain *TestChain) ChannelOpenAck(ctx context.Context, msg ibctestingtypes.MsgChannelOpenAck) error
- func (chain *TestChain) ChannelOpenConfirm(ctx context.Context, msg ibctestingtypes.MsgChannelOpenConfirm) error
- func (chain *TestChain) ChannelOpenInit(ctx context.Context, msg ibctestingtypes.MsgChannelOpenInit) (string, error)
- func (chain *TestChain) ChannelOpenTry(ctx context.Context, msg ibctestingtypes.MsgChannelOpenTry) (string, error)
- func (chain *TestChain) ChannelStateCommitmentKey(portID, channelID string) []byte
- func (chain *TestChain) Client() client.ChainClient
- func (chain *TestChain) ClientStateCommitmentKey(clientID string) []byte
- func (chain *TestChain) ConnectionOpenAck(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenAck) error
- func (chain *TestChain) ConnectionOpenConfirm(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenConfirm) error
- func (chain *TestChain) ConnectionOpenInit(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenInit) (string, error)
- func (chain *TestChain) ConnectionOpenTry(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenTry) (string, error)
- func (chain *TestChain) ConnectionStateCommitmentKey(connectionID string) []byte
- func (chain *TestChain) ConsensusStateCommitmentKey(clientID string, height exported.Height) []byte
- func (chain *TestChain) ConstructMockMsgCreateClient() ibctestingtypes.MsgCreateClient
- func (chain *TestChain) ConstructMockMsgUpdateClient(clientID string) ibctestingtypes.MsgUpdateClient
- func (chain *TestChain) ConstructTendermintMsgCreateClient(trustLevel ibctmtypes.Fraction, ...) ibctestingtypes.MsgCreateClient
- func (chain *TestChain) ConstructTendermintUpdateTMClientHeader(counterparty ibctestingtypes.TestChainI, clientID string) ibctestingtypes.MsgUpdateClient
- func (chain *TestChain) ConstructTrustedEthereumMsgCreateClient(publicKey cryptotypes.PubKey, diversifier string) ibctestingtypes.MsgCreateClient
- func (chain *TestChain) ConstructTrustedEthereumMsgUpdateClient(clientID string, privateKey cryptotypes.PrivKey, divisifier string) ibctestingtypes.MsgUpdateClient
- func (chain *TestChain) CreateClient(ctx context.Context, msg ibctestingtypes.MsgCreateClient) (string, error)
- func (chain *TestChain) FindPacket(ctx context.Context, sourcePortID string, sourceChannel string, ...) (exported.PacketI, error)
- func (chain *TestChain) GetChannel(portID, channelID string) (ibchost.ChannelData, bool, error)
- func (chain *TestChain) GetClientStateBytes(clientID string) []byte
- func (chain *TestChain) GetCommitmentPrefix() []byte
- func (chain *TestChain) GetConnection(connectionID string) (ibchost.ConnectionEndData, bool, error)
- func (chain *TestChain) GetContractState(storageKeys [][]byte, height *big.Int, clientType string) (client.ContractState, error)
- func (chain *TestChain) GetLastGeneratedChannelID(ctx context.Context) (string, error)
- func (chain *TestChain) GetLastGeneratedClientID(ctx context.Context) (string, error)
- func (chain *TestChain) GetLastGeneratedConnectionID(ctx context.Context) (string, error)
- func (chain *TestChain) GetLastSentPacket(ctx context.Context, sourcePortID string, sourceChannel string) (exported.PacketI, error)
- func (chain *TestChain) GetLatestHeight(clientID string, clientType string) (height exported.Height)
- func (chain *TestChain) GetMockClientState(clientID string) *mocktypes.ClientState
- func (chain *TestChain) GetSenderAddress() string
- func (chain *TestChain) GetTrustedEthClientState(clientID string) *trustedethereumtypes.ClientState
- func (chain *TestChain) HandlePacketAcknowledgement(ctx context.Context, packet exported.PacketI, acknowledgement []byte, ...) error
- func (chain *TestChain) HandlePacketRecv(ctx context.Context, packet exported.PacketI, proof *ibctestingtypes.Proof) error
- func (chain *TestChain) Init(chainID string) error
- func (chain *TestChain) LastHeader(clientType string) *gethtypes.Header
- func (chain *TestChain) MockAcknowledgementProof(ack []byte, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
- func (chain *TestChain) MockChannelProof(portID string, channelID string, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
- func (chain *TestChain) MockConnectionProof(connectionID string, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
- func (chain *TestChain) MockPacketProof(packet exported.PacketI, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
- func (chain *TestChain) NextBlock()
- func (chain *TestChain) PacketAcknowledgementCommitmentKey(portID, channelID string, sequence uint64) []byte
- func (chain *TestChain) PacketCommitmentKey(portID, channelID string, sequence uint64) []byte
- func (chain *TestChain) QueryProofAtHeight(storageKeyBytes []byte, height exported.Height, clientType string) (*ibctestingtypes.Proof, error)
- func (chain *TestChain) T() *testing.T
- func (chain *TestChain) TxOpts(ctx context.Context, index uint32) *bind.TransactOpts
- func (chain *TestChain) UpdateClient(ctx context.Context, msg ibctestingtypes.MsgUpdateClient) error
- func (chain *TestChain) WaitForReceiptAndGet(ctx context.Context, tx *gethtypes.Transaction) error
- func (chain *TestChain) WaitIfNoError(ctx context.Context) func(tx *gethtypes.Transaction, err error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractConfig ¶
type ContractConfig interface { GetIBCHostAddress() common.Address GetIBCHandlerAddress() common.Address GetIBCIdentifierAddress() common.Address GetIBFT2ClientAddress() common.Address GetMockClientAddress() common.Address GetSimpleTokenAddress() common.Address GetICS20TransferBankAddress() common.Address GetICS20BankAddress() common.Address }
type TestChain ¶
type TestChain struct { IBCHandler ibchandler.Ibchandler IBCHost ibchost.Ibchost IBCIdentifier ibcidentifier.Ibcidentifier // App Modules SimpleToken simpletoken.Simpletoken ICS20Transfer ics20transferbank.Ics20transferbank ICS20Bank ics20bank.Ics20bank ContractConfig ContractConfig // State LastContractState map[string]client.ContractState Codec codec.BinaryCodec // contains filtered or unexported fields }
func NewChain ¶
func NewChain(t *testing.T, chainClient client.ChainClient, config ContractConfig, mnemonicPhrase string) *TestChain
func (*TestChain) ChannelOpenAck ¶
func (chain *TestChain) ChannelOpenAck(ctx context.Context, msg ibctestingtypes.MsgChannelOpenAck) error
func (*TestChain) ChannelOpenConfirm ¶
func (chain *TestChain) ChannelOpenConfirm(ctx context.Context, msg ibctestingtypes.MsgChannelOpenConfirm) error
func (*TestChain) ChannelOpenInit ¶
func (chain *TestChain) ChannelOpenInit(ctx context.Context, msg ibctestingtypes.MsgChannelOpenInit) (string, error)
func (*TestChain) ChannelOpenTry ¶
func (chain *TestChain) ChannelOpenTry(ctx context.Context, msg ibctestingtypes.MsgChannelOpenTry) (string, error)
func (*TestChain) ChannelStateCommitmentKey ¶
func (*TestChain) Client ¶
func (chain *TestChain) Client() client.ChainClient
func (*TestChain) ClientStateCommitmentKey ¶
func (*TestChain) ConnectionOpenAck ¶
func (chain *TestChain) ConnectionOpenAck(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenAck) error
ConnectionOpenAck will construct and execute a MsgConnectionOpenAck.
func (*TestChain) ConnectionOpenConfirm ¶
func (chain *TestChain) ConnectionOpenConfirm(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenConfirm) error
func (*TestChain) ConnectionOpenInit ¶
func (chain *TestChain) ConnectionOpenInit(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenInit) (string, error)
func (*TestChain) ConnectionOpenTry ¶
func (chain *TestChain) ConnectionOpenTry(ctx context.Context, msg ibctestingtypes.MsgConnectionOpenTry) (string, error)
func (*TestChain) ConnectionStateCommitmentKey ¶
func (*TestChain) ConsensusStateCommitmentKey ¶
func (*TestChain) ConstructMockMsgCreateClient ¶
func (chain *TestChain) ConstructMockMsgCreateClient() ibctestingtypes.MsgCreateClient
func (*TestChain) ConstructMockMsgUpdateClient ¶
func (chain *TestChain) ConstructMockMsgUpdateClient(clientID string) ibctestingtypes.MsgUpdateClient
func (*TestChain) ConstructTendermintMsgCreateClient ¶
func (chain *TestChain) ConstructTendermintMsgCreateClient( trustLevel ibctmtypes.Fraction, trustingPeriod, unbondingPeriod, maxClockDrift time.Duration, upgradePath []string, allowUpdateAfterExpiry, allowUpdateAfterMisbehaviour bool, ) ibctestingtypes.MsgCreateClient
func (*TestChain) ConstructTendermintUpdateTMClientHeader ¶
func (chain *TestChain) ConstructTendermintUpdateTMClientHeader( counterparty ibctestingtypes.TestChainI, clientID string, ) ibctestingtypes.MsgUpdateClient
func (*TestChain) ConstructTrustedEthereumMsgCreateClient ¶
func (chain *TestChain) ConstructTrustedEthereumMsgCreateClient( publicKey cryptotypes.PubKey, diversifier string, ) ibctestingtypes.MsgCreateClient
func (*TestChain) ConstructTrustedEthereumMsgUpdateClient ¶
func (chain *TestChain) ConstructTrustedEthereumMsgUpdateClient( clientID string, privateKey cryptotypes.PrivKey, divisifier string, ) ibctestingtypes.MsgUpdateClient
func (*TestChain) CreateClient ¶
func (chain *TestChain) CreateClient(ctx context.Context, msg ibctestingtypes.MsgCreateClient) (string, error)
func (*TestChain) FindPacket ¶
func (*TestChain) GetChannel ¶
func (*TestChain) GetClientStateBytes ¶
func (*TestChain) GetCommitmentPrefix ¶
func (*TestChain) GetConnection ¶
func (*TestChain) GetContractState ¶
func (*TestChain) GetLastGeneratedChannelID ¶
func (*TestChain) GetLastGeneratedClientID ¶
func (*TestChain) GetLastGeneratedConnectionID ¶
func (*TestChain) GetLastSentPacket ¶
func (*TestChain) GetLatestHeight ¶
func (*TestChain) GetMockClientState ¶
func (chain *TestChain) GetMockClientState(clientID string) *mocktypes.ClientState
func (*TestChain) GetSenderAddress ¶
func (*TestChain) GetTrustedEthClientState ¶
func (chain *TestChain) GetTrustedEthClientState(clientID string) *trustedethereumtypes.ClientState
func (*TestChain) HandlePacketAcknowledgement ¶
func (*TestChain) HandlePacketRecv ¶
func (*TestChain) LastHeader ¶
func (*TestChain) MockAcknowledgementProof ¶
func (chain *TestChain) MockAcknowledgementProof(ack []byte, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
func (*TestChain) MockChannelProof ¶
func (chain *TestChain) MockChannelProof(portID string, channelID string, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
func (*TestChain) MockConnectionProof ¶
func (chain *TestChain) MockConnectionProof(connectionID string, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
func (*TestChain) MockPacketProof ¶
func (chain *TestChain) MockPacketProof(packet exported.PacketI, proof *ibctestingtypes.Proof) (*ibctestingtypes.Proof, error)
func (*TestChain) PacketAcknowledgementCommitmentKey ¶
func (*TestChain) PacketCommitmentKey ¶
func (*TestChain) QueryProofAtHeight ¶
func (chain *TestChain) QueryProofAtHeight( storageKeyBytes []byte, height exported.Height, clientType string, ) (*ibctestingtypes.Proof, error)
Querier
func (*TestChain) UpdateClient ¶
func (chain *TestChain) UpdateClient(ctx context.Context, msg ibctestingtypes.MsgUpdateClient) error
func (*TestChain) WaitForReceiptAndGet ¶
func (*TestChain) WaitIfNoError ¶
Click to show internal directories.
Click to hide internal directories.