Documentation ¶
Index ¶
- Constants
- Variables
- func MarshalWithAny(msg proto.Message) ([]byte, error)
- func PackAny(msg proto.Message) (*types.Any, error)
- func PacketToCallData(packet ibchandler.Packet) ibchandler.Packet
- func UnmarshalWithAny(bz []byte, msg proto.Message) error
- func UnpackAny(bz []byte) (*types.Any, error)
- type BroadcastLog
- type Chain
- func (chain *Chain) AddTestChannel(conn *TestConnection, portID string, version string) TestChannel
- func (chain *Chain) AddTestConnection(clientID, counterpartyClientID string) *TestConnection
- func (chain *Chain) Address(index uint32) common.Address
- func (chain *Chain) AdvanceBlockNumber(ctx context.Context, toBlockNumber uint64) error
- func (chain *Chain) CallOpts(ctx context.Context, index uint32) *bind.CallOpts
- func (chain *Chain) ChainIDU256() []byte
- func (chain *Chain) ChannelCloseConfirm(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel) error
- func (chain *Chain) ChannelCloseInit(ctx context.Context, ch TestChannel) error
- func (chain *Chain) ChannelOpenAck(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel) error
- func (chain *Chain) ChannelOpenConfirm(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel) error
- func (chain *Chain) ChannelOpenInit(ctx context.Context, ch, counterparty TestChannel, ...) (string, error)
- func (chain *Chain) ChannelOpenTry(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, ...) (string, error)
- func (chain *Chain) Client() *client.ETHClient
- func (chain *Chain) ConnectionOpenAck(ctx context.Context, counterparty *Chain, ...) error
- func (chain *Chain) ConnectionOpenConfirm(ctx context.Context, counterparty *Chain, ...) error
- func (chain *Chain) ConnectionOpenInit(ctx context.Context, counterparty *Chain, ...) (string, error)
- func (chain *Chain) ConnectionOpenTry(ctx context.Context, counterparty *Chain, ...) (string, error)
- func (chain *Chain) ConstructNextTestConnection(clientID, counterpartyClientID string) *TestConnection
- func (chain *Chain) ConstructQBFTMsgCreateClient(counterparty *Chain) ibchandler.IIBCClientMsgCreateClient
- func (chain *Chain) ConstructQBFTMsgUpdateClient(counterparty *Chain, clientID string) ibchandler.IIBCClientMsgUpdateClient
- func (chain *Chain) CreateQBFTClient(ctx context.Context, counterparty *Chain) (string, error)
- func (chain *Chain) EnsureChannelState(ctx context.Context, portID string, channelID string, ...) error
- func (chain *Chain) EnsurePacketCommitmentExistence(ctx context.Context, exists bool, portID string, channelID string, ...) error
- func (chain *Chain) FindAcknowledgement(ctx context.Context, portID string, channelID string, sequence uint64) ([]byte, error)
- func (chain *Chain) FindPacket(ctx context.Context, sourcePortID string, sourceChannel string, ...) (*ibchandler.Packet, error)
- func (chain *Chain) GetCommitmentPrefix() []byte
- func (chain *Chain) GetDelayPeriod() uint64
- func (chain *Chain) GetLastGeneratedChannelID(ctx context.Context) (string, error)
- func (chain *Chain) GetLastGeneratedClientID(ctx context.Context) (string, error)
- func (chain *Chain) GetLastGeneratedConnectionID(ctx context.Context) (string, error)
- func (chain *Chain) GetLastSentPacket(ctx context.Context, sourcePortID string, sourceChannel string) (*ibchandler.Packet, error)
- func (chain *Chain) GetLightClientInputData(counterparty *Chain, counterpartyClientID string, storageKeys [][]byte, ...) (*LightClientInputData, error)
- func (chain *Chain) GetQBFTClientState(clientID string) *qbftclienttypes.ClientState
- func (chain *Chain) GetQBFTConsensusState(clientID string, height ibcclient.Height) *qbftclienttypes.ConsensusState
- func (chain *Chain) HandlePacketAcknowledgement(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, ...) error
- func (chain *Chain) HandlePacketRecv(ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, ...) error
- func (chain *Chain) LastHeader() *gethtypes.Header
- func (chain *Chain) NextTestChannel(conn *TestConnection, portID string, version string) TestChannel
- func (chain *Chain) QueryChannelProof(counterparty *Chain, counterpartyClientID string, channel TestChannel, ...) (*Proof, error)
- func (chain *Chain) QueryClientStateProof(counterparty *Chain, clientID, counterpartyClientID string, height *big.Int) ([]byte, ibcclient.Height, *Proof, error)
- func (chain *Chain) QueryConnectionProof(counterparty *Chain, counterpartyClientID string, connectionID string, ...) (*Proof, error)
- func (chain *Chain) QueryConsensusStateProof(counterparty *Chain, clientID, counterpartyClientID string, ...) ([]byte, *Proof, error)
- func (chain *Chain) QueryNextSequenceRecvProof(counterparty *Chain, counterpartyClientID string, channel TestChannel, ...) (*Proof, error)
- func (chain *Chain) QueryPacketReceiptProof(counterparty *Chain, counterpartyClientID string, ...) (*Proof, error)
- func (chain *Chain) QueryProof(counterparty *Chain, counterpartyClientID string, storageKey string, ...) (*Proof, error)
- func (chain *Chain) SendPacket(ctx context.Context, packet ibchandler.Packet) error
- func (chain *Chain) SetDelayPeriod(delayPeriod uint64)
- func (chain *Chain) SetExpectedTimePerBlock(ctx context.Context, callerIndex uint32, duration uint64) error
- func (chain *Chain) TimeoutOnClose(ctx context.Context, packet ibchandler.Packet, counterparty *Chain, ...) error
- func (chain *Chain) TimeoutPacket(ctx context.Context, packet ibchandler.Packet, counterparty *Chain, ...) error
- func (chain *Chain) TxOpts(ctx context.Context, index uint32) *bind.TransactOpts
- func (chain *Chain) UpdateLCInputData()
- func (chain *Chain) UpdateQBFTClient(ctx context.Context, counterparty *Chain, clientID string, ...) error
- func (chain *Chain) WaitForReceiptAndGet(ctx context.Context, tx *gethtypes.Transaction, txName string) error
- func (chain *Chain) WaitIfNoError(ctx context.Context, txName string) func(tx *gethtypes.Transaction, err error) error
- type ContractConfig
- type Coordinator
- func (c *Coordinator) Approve(ctx context.Context, chain *Chain, senderIndex uint32, amount uint64) error
- func (c *Coordinator) ChanCloseConfirm(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) ChanCloseInit(ctx context.Context, source, counterparty *Chain, sourceChannel TestChannel) error
- func (c *Coordinator) ChanOpenAck(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) ChanOpenConfirm(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) ChanOpenInit(ctx context.Context, source, counterparty *Chain, ...) (TestChannel, TestChannel, error)
- func (c *Coordinator) ChanOpenTry(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) CloseChannel(ctx context.Context, chainA, chainB *Chain, chanA, chanB TestChannel)
- func (c *Coordinator) ConnOpenAck(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) ConnOpenConfirm(ctx context.Context, source, counterparty *Chain, ...) error
- func (c Coordinator) ConnOpenInit(ctx context.Context, source, counterparty *Chain, ...) (*TestConnection, *TestConnection, error)
- func (c *Coordinator) ConnOpenTry(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) CreateChannel(ctx context.Context, chainA, chainB *Chain, connA, connB *TestConnection, ...) (TestChannel, TestChannel)
- func (c Coordinator) CreateClient(ctx context.Context, source, counterparty *Chain) (clientID string, err error)
- func (c *Coordinator) CreateConnection(ctx context.Context, chainA, chainB *Chain, clientA, clientB string) (*TestConnection, *TestConnection)
- func (c Coordinator) GetChain(idx int) *Chain
- func (c *Coordinator) HandlePacketAcknowledgement(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) HandlePacketRecv(ctx context.Context, source, counterparty *Chain, ...) error
- func (c *Coordinator) RelayLastSentPacket(ctx context.Context, source, counterparty *Chain, ...)
- func (c *Coordinator) RelayLastSentPacketWithDelay(ctx context.Context, source, counterparty *Chain, ...)
- func (c *Coordinator) SendPacket(ctx context.Context, source, counterparty *Chain, packet ibchandler.Packet, ...) error
- func (coord *Coordinator) SetupClientConnections(ctx context.Context, chainA, chainB *Chain) (string, string, *TestConnection, *TestConnection)
- func (coord *Coordinator) SetupClients(ctx context.Context, chainA, chainB *Chain) (string, string)
- func (c Coordinator) UpdateClient(ctx context.Context, source, counterparty *Chain, clientID string, ...) error
- func (coord *Coordinator) UpdateLCInputData()
- type LightClient
- type LightClientInputData
- func (cs LightClientInputData) GetCommitSeals() [][]byte
- func (cs LightClientInputData) Header() *gethtypes.Header
- func (cs LightClientInputData) MembershipProof() *client.StateProof
- func (cs LightClientInputData) SealingHeaderRLP(consensusType chains.ConsensusType) []byte
- func (cs LightClientInputData) Validators() [][]byte
- type Proof
- type TestChannel
- type TestConnection
- type Transaction
Constants ¶
const ( ICS20Version = "ics20-1" MockAppVersion = "mockapp-1" TransferPort = "transfer" MockPort = "mock" RelayerKeyIndex uint32 = 0 MockPacketData = "mock packet data" MockFailPacketData = "mock failed packet data" MockAsyncPacketData = "mock async packet data" )
Variables ¶
var ( DefaultPrefix = "ibc" BlockTime uint64 = 1000 * 1000 * 1000 // 1[sec] DefaultDelayPeriod uint64 = 0 // sec DefaultTrustPeriod uint64 = 5 * 60 // sec DefaultMaxClockDrift uint64 = 30 // sec )
var IBCErrorsRepository client.ErrorsRepository
IBCErrorsRepository is a repository of custom errors defined in the ibc-solidity contracts.
Functions ¶
func PacketToCallData ¶ added in v0.3.12
func PacketToCallData(packet ibchandler.Packet) ibchandler.Packet
Types ¶
type BroadcastLog ¶ added in v0.3.5
type BroadcastLog struct {
Transactions []Transaction `json:"transactions"`
}
type Chain ¶
type Chain struct { ContractConfig ContractConfig // Core Modules IBCHandler ibchandler.Ibchandler // App Modules ERC20 erc20.Erc20 ICS20Transfer ics20transfer.Ics20transfer IBCMockApp ibcmockapp.Ibcmockapp // Input data for light client LatestLCInputData *LightClientInputData // IBC specific helpers ClientIDs []string // ClientID's used on this chain Connections []*TestConnection // track connectionID's created for this chain // contains filtered or unexported fields }
func (*Chain) AddTestChannel ¶
func (chain *Chain) AddTestChannel(conn *TestConnection, portID string, version string) TestChannel
AddTestChannel appends a new TestChannel which contains references to the port and channel ID used for channel creation and interaction. See 'NextTestChannel' for channel ID naming format.
func (*Chain) AddTestConnection ¶
func (chain *Chain) AddTestConnection(clientID, counterpartyClientID string) *TestConnection
AddTestConnection appends a new TestConnection which contains references to the connection id, client id and counterparty client id.
func (*Chain) AdvanceBlockNumber ¶ added in v0.3.12
func (*Chain) ChainIDU256 ¶ added in v0.3.29
func (*Chain) ChannelCloseConfirm ¶
func (*Chain) ChannelCloseInit ¶
func (chain *Chain) ChannelCloseInit( ctx context.Context, ch TestChannel, ) error
func (*Chain) ChannelOpenAck ¶
func (*Chain) ChannelOpenConfirm ¶
func (*Chain) ChannelOpenInit ¶
func (chain *Chain) ChannelOpenInit( ctx context.Context, ch, counterparty TestChannel, order channeltypes.Channel_Order, connectionID string, ) (string, error)
func (*Chain) ChannelOpenTry ¶
func (chain *Chain) ChannelOpenTry( ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, order channeltypes.Channel_Order, connectionID string, ) (string, error)
func (*Chain) ConnectionOpenAck ¶
func (chain *Chain) ConnectionOpenAck( ctx context.Context, counterparty *Chain, connection, counterpartyConnection *TestConnection, ) error
ConnectionOpenAck will construct and execute a MsgConnectionOpenAck.
func (*Chain) ConnectionOpenConfirm ¶
func (*Chain) ConnectionOpenInit ¶
func (*Chain) ConnectionOpenTry ¶
func (*Chain) ConstructNextTestConnection ¶
func (chain *Chain) ConstructNextTestConnection(clientID, counterpartyClientID string) *TestConnection
ConstructNextTestConnection constructs the next test connection to be created given a clientID and counterparty clientID.
func (*Chain) ConstructQBFTMsgCreateClient ¶ added in v0.3.29
func (chain *Chain) ConstructQBFTMsgCreateClient(counterparty *Chain) ibchandler.IIBCClientMsgCreateClient
func (*Chain) ConstructQBFTMsgUpdateClient ¶ added in v0.3.29
func (chain *Chain) ConstructQBFTMsgUpdateClient(counterparty *Chain, clientID string) ibchandler.IIBCClientMsgUpdateClient
func (*Chain) CreateQBFTClient ¶ added in v0.3.29
func (*Chain) EnsureChannelState ¶ added in v0.3.12
func (chain *Chain) EnsureChannelState( ctx context.Context, portID string, channelID string, state channeltypes.Channel_State, ) error
func (*Chain) EnsurePacketCommitmentExistence ¶ added in v0.3.12
func (*Chain) FindAcknowledgement ¶ added in v0.3.15
func (*Chain) FindPacket ¶
func (*Chain) GetCommitmentPrefix ¶
func (*Chain) GetDelayPeriod ¶ added in v0.3.12
func (*Chain) GetLastGeneratedChannelID ¶
func (*Chain) GetLastGeneratedClientID ¶
func (*Chain) GetLastGeneratedConnectionID ¶
func (*Chain) GetLastSentPacket ¶
func (*Chain) GetLightClientInputData ¶ added in v0.3.12
func (*Chain) GetQBFTClientState ¶ added in v0.3.29
func (chain *Chain) GetQBFTClientState(clientID string) *qbftclienttypes.ClientState
func (*Chain) GetQBFTConsensusState ¶ added in v0.3.29
func (chain *Chain) GetQBFTConsensusState(clientID string, height ibcclient.Height) *qbftclienttypes.ConsensusState
func (*Chain) HandlePacketAcknowledgement ¶
func (chain *Chain) HandlePacketAcknowledgement( ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, packet ibchandler.Packet, acknowledgement []byte, ) error
func (*Chain) HandlePacketRecv ¶
func (chain *Chain) HandlePacketRecv( ctx context.Context, counterparty *Chain, ch, counterpartyCh TestChannel, packet ibchandler.Packet, ) error
func (*Chain) LastHeader ¶
func (*Chain) NextTestChannel ¶
func (chain *Chain) NextTestChannel(conn *TestConnection, portID string, version string) TestChannel
NextTestChannel returns the next test channel to be created on this connection, but does not add it to the list of created channels. This function is expected to be used when the caller has not created the associated channel in app state, but would still like to refer to the non-existent channel usually to test for its non-existence.
The port is passed in by the caller.
func (*Chain) QueryChannelProof ¶
func (*Chain) QueryClientStateProof ¶ added in v0.3.22
func (*Chain) QueryConnectionProof ¶
func (*Chain) QueryConsensusStateProof ¶ added in v0.3.22
func (*Chain) QueryNextSequenceRecvProof ¶ added in v0.3.15
func (*Chain) QueryPacketReceiptProof ¶ added in v0.3.12
func (*Chain) QueryProof ¶
func (*Chain) SendPacket ¶
func (*Chain) SetDelayPeriod ¶ added in v0.3.12
func (*Chain) SetExpectedTimePerBlock ¶ added in v0.3.12
func (*Chain) TimeoutOnClose ¶ added in v0.3.12
func (chain *Chain) TimeoutOnClose( ctx context.Context, packet ibchandler.Packet, counterparty *Chain, channel TestChannel, counterpartyChannel TestChannel, ) error
func (*Chain) TimeoutPacket ¶ added in v0.3.12
func (chain *Chain) TimeoutPacket( ctx context.Context, packet ibchandler.Packet, counterparty *Chain, channel TestChannel, counterpartyChannel TestChannel, ) error
func (*Chain) UpdateLCInputData ¶ added in v0.3.12
func (chain *Chain) UpdateLCInputData()
func (*Chain) UpdateQBFTClient ¶ added in v0.3.29
func (*Chain) WaitForReceiptAndGet ¶
func (*Chain) WaitIfNoError ¶
type ContractConfig ¶
type ContractConfig struct { ICS20TransferAddress common.Address ERC20TokenAddress common.Address IBCMockAppAddress common.Address // contains filtered or unexported fields }
func (*ContractConfig) GetIBCHandlerAddress ¶
func (cc *ContractConfig) GetIBCHandlerAddress() common.Address
func (*ContractConfig) IsUpgradeable ¶ added in v0.3.37
func (cc *ContractConfig) IsUpgradeable() bool
func (*ContractConfig) Validate ¶ added in v0.3.5
func (cc *ContractConfig) Validate() error
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func NewCoordinator ¶
func NewCoordinator(t *testing.T, chains ...*Chain) Coordinator
func (*Coordinator) ChanCloseConfirm ¶
func (c *Coordinator) ChanCloseConfirm( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, ) error
ChanCloseConfirm confirms closing of a channel on chain A to chain B, after which the channel is closed on both chains (this code is executed on chain B).
func (*Coordinator) ChanCloseInit ¶
func (c *Coordinator) ChanCloseInit( ctx context.Context, source, counterparty *Chain, sourceChannel TestChannel, ) error
ChanCloseInit closes a channel on chain A to chain B (this code is executed on chain A).
func (*Coordinator) ChanOpenAck ¶
func (c *Coordinator) ChanOpenAck( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, ) error
ChanOpenAck relays acceptance of a channel open attempt from chain B back to chain A (this code is executed on chain A).
func (*Coordinator) ChanOpenConfirm ¶
func (c *Coordinator) ChanOpenConfirm( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, ) error
ChanOpenConfirm confirms opening of a channel on chain A to chain B, after which the channel is open on both chains (this code is executed on chain B).
func (*Coordinator) ChanOpenInit ¶
func (c *Coordinator) ChanOpenInit( ctx context.Context, source, counterparty *Chain, connection, counterpartyConnection *TestConnection, sourcePortID, counterpartyPortID string, order channeltypes.Channel_Order, version string, ) (TestChannel, TestChannel, error)
ChanOpenInit initializes a channel on the source chain with the state INIT using the OpenInit handshake call.
NOTE: The counterparty testing channel will be created even if it is not created in the application state.
func (*Coordinator) ChanOpenTry ¶
func (c *Coordinator) ChanOpenTry( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel *TestChannel, connection *TestConnection, order channeltypes.Channel_Order, ) error
ChanOpenTry relays notice of a channel open attempt on chain A to chain B (this code is executed on chain B).
func (*Coordinator) CloseChannel ¶
func (c *Coordinator) CloseChannel( ctx context.Context, chainA, chainB *Chain, chanA, chanB TestChannel, )
CloseChannel constructs and executes channel closing messages in order to transition the channel to the CLOSED state on chainA and chainB. The function expects the channels to be successfully closed otherwise testing will fail.
func (*Coordinator) ConnOpenAck ¶
func (c *Coordinator) ConnOpenAck( ctx context.Context, source, counterparty *Chain, sourceConnection, counterpartyConnection *TestConnection, ) error
ConnOpenAck initializes a connection on the source chain with the state OPEN using the OpenAck handshake call.
func (*Coordinator) ConnOpenConfirm ¶
func (c *Coordinator) ConnOpenConfirm( ctx context.Context, source, counterparty *Chain, sourceConnection, counterpartyConnection *TestConnection, ) error
ConnOpenConfirm initializes a connection on the source chain with the state OPEN using the OpenConfirm handshake call.
func (Coordinator) ConnOpenInit ¶
func (c Coordinator) ConnOpenInit( ctx context.Context, source, counterparty *Chain, clientID, counterpartyClientID string, ) (*TestConnection, *TestConnection, error)
ConnOpenInit initializes a connection on the source chain with the state INIT using the OpenInit handshake call.
NOTE: The counterparty testing connection will be created even if it is not created in the application state.
func (*Coordinator) ConnOpenTry ¶
func (c *Coordinator) ConnOpenTry( ctx context.Context, source, counterparty *Chain, sourceConnection, counterpartyConnection *TestConnection, ) error
ConnOpenTry initializes a connection on the source chain with the state TRYOPEN using the OpenTry handshake call.
func (*Coordinator) CreateChannel ¶
func (c *Coordinator) CreateChannel( ctx context.Context, chainA, chainB *Chain, connA, connB *TestConnection, sourcePortID, counterpartyPortID string, order channeltypes.Channel_Order, version string, ) (TestChannel, TestChannel)
CreateChannel constructs and executes channel handshake messages in order to create OPEN channels on chainA and chainB. The function expects the channels to be successfully opened otherwise testing will fail.
func (Coordinator) CreateClient ¶
func (*Coordinator) CreateConnection ¶
func (c *Coordinator) CreateConnection( ctx context.Context, chainA, chainB *Chain, clientA, clientB string, ) (*TestConnection, *TestConnection)
CreateConnection constructs and executes connection handshake messages in order to create OPEN channels on chainA and chainB. The connection information of for chainA and chainB are returned within a TestConnection struct. The function expects the connections to be successfully opened otherwise testing will fail.
func (Coordinator) GetChain ¶
func (c Coordinator) GetChain(idx int) *Chain
func (*Coordinator) HandlePacketAcknowledgement ¶
func (c *Coordinator) HandlePacketAcknowledgement( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, packet ibchandler.Packet, acknowledgement []byte, ) error
func (*Coordinator) HandlePacketRecv ¶
func (c *Coordinator) HandlePacketRecv( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, packet ibchandler.Packet, ) error
func (*Coordinator) RelayLastSentPacket ¶ added in v0.3.12
func (c *Coordinator) RelayLastSentPacket( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, packetCb func([]byte), ackCb func([]byte), )
func (*Coordinator) RelayLastSentPacketWithDelay ¶ added in v0.3.12
func (c *Coordinator) RelayLastSentPacketWithDelay( ctx context.Context, source, counterparty *Chain, sourceChannel, counterpartyChannel TestChannel, sourceDelayPeriodExtension, counterpartyDelayPeriodExtension uint64, delayStartTimeForRecv time.Time, )
func (*Coordinator) SendPacket ¶
func (c *Coordinator) SendPacket( ctx context.Context, source, counterparty *Chain, packet ibchandler.Packet, counterpartyClientID string, ) error
SendPacket sends a packet through the channel keeper on the source chain and updates the counterparty client for the source chain.
func (*Coordinator) SetupClientConnections ¶
func (coord *Coordinator) SetupClientConnections( ctx context.Context, chainA, chainB *Chain, ) (string, string, *TestConnection, *TestConnection)
SetupClientConnections is a helper function to create clients and the appropriate connections on both the source and counterparty chain. It assumes the caller does not anticipate any errors.
func (*Coordinator) SetupClients ¶
func (coord *Coordinator) SetupClients( ctx context.Context, chainA, chainB *Chain, ) (string, string)
SetupClients is a helper function to create clients on both chains. It assumes the caller does not anticipate any errors.
func (Coordinator) UpdateClient ¶
func (*Coordinator) UpdateLCInputData ¶ added in v0.3.12
func (coord *Coordinator) UpdateLCInputData()
type LightClient ¶ added in v0.2.0
type LightClient struct {
// contains filtered or unexported fields
}
func NewLightClient ¶ added in v0.2.0
func NewLightClient(cl *client.ETHClient, consensusType chains.ConsensusType) *LightClient
func (LightClient) GenerateInputData ¶ added in v0.3.12
func (lc LightClient) GenerateInputData(ctx context.Context, address common.Address, storageKeys [][]byte, bn *big.Int) (*LightClientInputData, error)
type LightClientInputData ¶ added in v0.3.12
type LightClientInputData struct { ParsedHeader *chains.ParsedHeader StateProof *client.StateProof CommitSeals [][]byte }
func (LightClientInputData) GetCommitSeals ¶ added in v0.3.29
func (cs LightClientInputData) GetCommitSeals() [][]byte
func (LightClientInputData) Header ¶ added in v0.3.12
func (cs LightClientInputData) Header() *gethtypes.Header
func (LightClientInputData) MembershipProof ¶ added in v0.3.12
func (cs LightClientInputData) MembershipProof() *client.StateProof
func (LightClientInputData) SealingHeaderRLP ¶ added in v0.3.29
func (cs LightClientInputData) SealingHeaderRLP(consensusType chains.ConsensusType) []byte
func (LightClientInputData) Validators ¶ added in v0.3.29
func (cs LightClientInputData) Validators() [][]byte
type TestChannel ¶
type TestChannel struct { PortID string ID string ClientID string CounterpartyClientID string Version string }
TestChannel is a testing helper struct to keep track of the portID and channelID used in creating and interacting with a channel. The clientID and counterparty client ID are also tracked to cut down on querying and argument passing.
type TestConnection ¶
type TestConnection struct { ID string ClientID string CounterpartyClientID string Channels []TestChannel }
TestConnection is a testing helper struct to keep track of the connectionID, source clientID, , and counterparty clientID used in creating and interacting with a connection.