Versions in this module Expand all Collapse all v8 v8.8.8 Jul 11, 2024 Changes in this version + const DefaultChannelVersion + const DefaultDelayPeriod + const Description + const FirstChannelID + const FirstClientID + const FirstConnectionID + const InvalidID + const MaxClockDrift + const MockFeePort + const MockPort + const SecondClientID + const Title + const TransferPort + const TrustingPeriod + const UnbondingPeriod + var ChainIDPrefix = "testchain" + var ChainIDSuffix = "-1" + var ConnectionVersion = connectiontypes.GetCompatibleVersions()[0] + var DefaultOpenInitVersion *connectiontypes.Version + var DefaultSolomachineClientID = "06-solomachine-0" + var DefaultTestingAppInit = SetupTestingApp + var DefaultTimeoutTimestampDelta = uint64(time.Hour.Nanoseconds()) + var DefaultTrustLevel = ibctm.DefaultTrustLevel + var EmptyForwardingPacketData = ibctransfertypes.ForwardingPacketData + var MaxAccounts = 10 + var MockAcknowledgement = mock.MockAcknowledgement.Acknowledgement() + var MockFailPacketData = mock.MockFailPacketData + var MockPacketData = mock.MockPacketData + var MockRecvCanaryCapabilityName = mock.MockRecvCanaryCapabilityName + var SecondaryDenom = "ufoo" + var SecondaryTestCoin = sdk.NewCoin(SecondaryDenom, sdkmath.NewInt(100)) + var TestAccAddress = "cosmos17dtl0mjt3t77kpuhg2edqzjpszulwhgzuj9ljs" + var TestCoin = sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(100)) + var TestCoins = sdk.NewCoins(TestCoin, SecondaryTestCoin) + var TimeIncrement = time.Second * 5 + var UpgradePath = []string + func ApplyValSetChanges(tb testing.TB, valSet *cmttypes.ValidatorSet, ...) *cmttypes.ValidatorSet + func AssertEvents(suite *testifysuite.Suite, expected []abci.Event, actual []abci.Event) + func CommitHeader(proposedHeader cmttypes.Header, valSet *cmttypes.ValidatorSet, ...) (*cmtproto.SignedHeader, error) + func GenerateKeys(t *testing.T, n uint64) ([]cryptotypes.PrivKey, []cryptotypes.PubKey, cryptotypes.PubKey) + func GenerateString(length uint) string + func GetChainID(index int) string + func MakeBlockID(hash []byte, partSetSize uint32, partSetHash []byte) cmttypes.BlockID + func ParseAckFromEvents(events []abci.Event) ([]byte, error) + func ParseChannelIDFromEvents(events []abci.Event) (string, error) + func ParseClientIDFromEvents(events []abci.Event) (string, error) + func ParseConnectionIDFromEvents(events []abci.Event) (string, error) + func ParsePacketFromEvents(events []abci.Event) (channeltypes.Packet, error) + func ParsePacketSequenceFromEvents(events []abci.Event) (uint64, error) + func ParsePacketsFromEvents(eventType string, events []abci.Event) ([]channeltypes.Packet, error) + func ParseProposalIDFromEvents(events []abci.Event) (uint64, error) + func ParseRecvPacketFromEvents(events []abci.Event) (channeltypes.Packet, error) + func UnmarshalMsgResponses(cdc codec.Codec, data []byte, msgs ...codec.ProtoMarshaler) error + func VoteAndCheckProposalStatus(endpoint *Endpoint, proposalID uint64) error + type ChannelConfig struct + Order channeltypes.Order + PortID string + ProposedUpgrade channeltypes.Upgrade + Version string + func NewChannelConfig() *ChannelConfig + type ClientConfig interface + GetClientType func() string + type ConnectionConfig struct + DelayPeriod uint64 + Version *connectiontypes.Version + func NewConnectionConfig() *ConnectionConfig + type Coordinator struct + Chains map[string]*TestChain + CurrentTime time.Time + func NewCoordinator(t *testing.T, n int) *Coordinator + func (*Coordinator) CreateChannels(path *Path) + func (*Coordinator) CreateConnections(path *Path) + func (*Coordinator) CreateMockChannels(path *Path) + func (*Coordinator) CreateTransferChannels(path *Path) + func (*Coordinator) Setup(path *Path) + func (*Coordinator) SetupClients(path *Path) + func (*Coordinator) SetupConnections(path *Path) + func (coord *Coordinator) CommitBlock(chains ...*TestChain) + func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) + func (coord *Coordinator) GetChain(chainID string) *TestChain + func (coord *Coordinator) IncrementTime() + func (coord *Coordinator) IncrementTimeBy(increment time.Duration) + func (coord *Coordinator) UpdateTime() + func (coord *Coordinator) UpdateTimeForChain(chain *TestChain) + type Endpoint struct + Chain *TestChain + ChannelConfig *ChannelConfig + ChannelID string + ClientConfig ClientConfig + ClientID string + ConnectionConfig *ConnectionConfig + ConnectionID string + Counterparty *Endpoint + func NewDefaultEndpoint(chain *TestChain) *Endpoint + func NewEndpoint(chain *TestChain, clientConfig ClientConfig, ...) *Endpoint + func (endpoint *Endpoint) AcknowledgePacket(packet channeltypes.Packet, ack []byte) error + func (endpoint *Endpoint) AcknowledgePacketWithResult(packet channeltypes.Packet, ack []byte) (*abci.ExecTxResult, error) + func (endpoint *Endpoint) ChanCloseInit() error + func (endpoint *Endpoint) ChanOpenAck() error + func (endpoint *Endpoint) ChanOpenConfirm() error + func (endpoint *Endpoint) ChanOpenInit() error + func (endpoint *Endpoint) ChanOpenTry() error + func (endpoint *Endpoint) ChanUpgradeAck() error + func (endpoint *Endpoint) ChanUpgradeCancel() error + func (endpoint *Endpoint) ChanUpgradeConfirm() error + func (endpoint *Endpoint) ChanUpgradeInit() error + func (endpoint *Endpoint) ChanUpgradeOpen() error + func (endpoint *Endpoint) ChanUpgradeTimeout() error + func (endpoint *Endpoint) ChanUpgradeTry() error + func (endpoint *Endpoint) ConnOpenAck() error + func (endpoint *Endpoint) ConnOpenConfirm() error + func (endpoint *Endpoint) ConnOpenInit() error + func (endpoint *Endpoint) ConnOpenTry() error + func (endpoint *Endpoint) CreateClient() (err error) + func (endpoint *Endpoint) GetChannel() channeltypes.Channel + func (endpoint *Endpoint) GetChannelUpgrade() channeltypes.Upgrade + func (endpoint *Endpoint) GetClientLatestHeight() exported.Height + func (endpoint *Endpoint) GetClientState() exported.ClientState + func (endpoint *Endpoint) GetConnection() connectiontypes.ConnectionEnd + func (endpoint *Endpoint) GetConsensusState(height exported.Height) exported.ConsensusState + func (endpoint *Endpoint) GetProposedUpgrade() channeltypes.Upgrade + func (endpoint *Endpoint) IncrementNextChannelSequence() + func (endpoint *Endpoint) QueryChannelUpgradeProof() ([]byte, []byte, clienttypes.Height) + func (endpoint *Endpoint) QueryClientStateProof() (exported.ClientState, []byte) + func (endpoint *Endpoint) QueryConnectionHandshakeProof() (clientState exported.ClientState, clientProof, consensusProof []byte, ...) + func (endpoint *Endpoint) QueryProof(key []byte) ([]byte, clienttypes.Height) + func (endpoint *Endpoint) QueryProofAtHeight(key []byte, height uint64) ([]byte, clienttypes.Height) + func (endpoint *Endpoint) RecvPacket(packet channeltypes.Packet) error + func (endpoint *Endpoint) RecvPacketWithResult(packet channeltypes.Packet) (*abci.ExecTxResult, error) + func (endpoint *Endpoint) SendPacket(timeoutHeight clienttypes.Height, timeoutTimestamp uint64, data []byte) (uint64, error) + func (endpoint *Endpoint) SetChannel(channel channeltypes.Channel) + func (endpoint *Endpoint) SetChannelCounterpartyUpgrade(upgrade channeltypes.Upgrade) + func (endpoint *Endpoint) SetChannelState(state channeltypes.State) error + func (endpoint *Endpoint) SetChannelUpgrade(upgrade channeltypes.Upgrade) + func (endpoint *Endpoint) SetClientState(clientState exported.ClientState) + func (endpoint *Endpoint) SetConnection(connection connectiontypes.ConnectionEnd) + func (endpoint *Endpoint) SetConsensusState(consensusState exported.ConsensusState, height exported.Height) + func (endpoint *Endpoint) TimeoutOnClose(packet channeltypes.Packet) error + func (endpoint *Endpoint) TimeoutPacket(packet channeltypes.Packet) error + func (endpoint *Endpoint) UpdateChannel(updater func(channel *channeltypes.Channel)) + func (endpoint *Endpoint) UpdateClient() (err error) + func (endpoint *Endpoint) UpdateConnection(updater func(connection *connectiontypes.ConnectionEnd)) + func (endpoint *Endpoint) UpgradeChain() error + func (endpoint *Endpoint) WriteAcknowledgement(ack exported.Acknowledgement, packet exported.PacketI) error + type Path struct + EndpointA *Endpoint + EndpointB *Endpoint + func EnableFeeOnPath(path *Path) *Path + func NewPath(chainA, chainB *TestChain) *Path + func NewPathWithFeeEnabled(chainA, chainB *TestChain) *Path + func NewTransferPath(chainA, chainB *TestChain) *Path + func NewTransferPathWithFeeEnabled(chainA, chainB *TestChain) *Path + func (path *Path) CreateChannels() + func (path *Path) CreateConnections() + func (path *Path) DisableUniqueChannelIDs() *Path + func (path *Path) RelayPacket(packet channeltypes.Packet) error + func (path *Path) RelayPacketWithResults(packet channeltypes.Packet) (*abci.ExecTxResult, []byte, error) + func (path *Path) SetChannelOrdered() + func (path *Path) Setup() + func (path *Path) SetupClients() + func (path *Path) SetupConnections() + type SenderAccount struct + SenderAccount sdk.AccountI + SenderPrivKey cryptotypes.PrivKey + type Solomachine struct + ClientID string + Diversifier string + PrivateKeys []cryptotypes.PrivKey + PublicKey cryptotypes.PubKey + PublicKeys []cryptotypes.PubKey + Sequence uint64 + Time uint64 + func NewSolomachine(t *testing.T, cdc codec.BinaryCodec, clientID, diversifier string, ...) *Solomachine + func (solo *Solomachine) AcknowledgePacket(chain *TestChain, packet channeltypes.Packet) + func (solo *Solomachine) ChanCloseConfirm(chain *TestChain, portID, channelID string) + func (solo *Solomachine) ChanOpenAck(chain *TestChain, channelID string) + func (solo *Solomachine) ChanOpenInit(chain *TestChain, connectionID string) string + func (solo *Solomachine) ClientState() *solomachine.ClientState + func (solo *Solomachine) ConnOpenAck(chain *TestChain, clientID, connectionID string) + func (solo *Solomachine) ConnOpenInit(chain *TestChain, clientID string) string + func (solo *Solomachine) ConsensusState() *solomachine.ConsensusState + func (solo *Solomachine) CreateClient(chain *TestChain) string + func (solo *Solomachine) CreateHeader(newDiversifier string) *solomachine.Header + func (solo *Solomachine) CreateMisbehaviour() *solomachine.Misbehaviour + func (solo *Solomachine) GenerateAcknowledgementProof(packet channeltypes.Packet) []byte + func (solo *Solomachine) GenerateChanClosedProof(portID, version, counterpartyChannelID string) []byte + func (solo *Solomachine) GenerateChanOpenTryProof(portID, version, counterpartyChannelID string) []byte + func (solo *Solomachine) GenerateClientStateProof(clientState exported.ClientState) []byte + func (solo *Solomachine) GenerateCommitmentProof(packet channeltypes.Packet) []byte + func (solo *Solomachine) GenerateConnOpenTryProof(counterpartyClientID, counterpartyConnectionID string) []byte + func (solo *Solomachine) GenerateConsensusStateProof(consensusState exported.ConsensusState, consensusHeight exported.Height) []byte + func (solo *Solomachine) GenerateProof(signBytes *solomachine.SignBytes) []byte + func (solo *Solomachine) GenerateReceiptAbsenceProof(packet channeltypes.Packet) []byte + func (solo *Solomachine) GenerateSignature(signBytes []byte) []byte + func (solo *Solomachine) GetChannelStatePath(portID, channelID string) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetClientStatePath(counterpartyClientIdentifier string) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetConnectionStatePath(connID string) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetConsensusStatePath(counterpartyClientIdentifier string, consensusHeight exported.Height) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetHeight() exported.Height + func (solo *Solomachine) GetNextSequenceRecvPath(portID, channelID string) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetPacketAcknowledgementPath(portID, channelID string, sequence uint64) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetPacketCommitmentPath(portID, channelID string, sequence uint64) commitmenttypesv2.MerklePath + func (solo *Solomachine) GetPacketReceiptPath(portID, channelID string, sequence uint64) commitmenttypesv2.MerklePath + func (solo *Solomachine) RecvPacket(chain *TestChain, packet channeltypes.Packet) + func (solo *Solomachine) SendTransfer(chain *TestChain, portID, channelID string, ...) channeltypes.Packet + func (solo *Solomachine) TimeoutPacket(chain *TestChain, packet channeltypes.Packet) + func (solo *Solomachine) TimeoutPacketOnClose(chain *TestChain, packet channeltypes.Packet, channelID string) + func (solo *Solomachine) UpdateClient(chain *TestChain, clientID string) + type TendermintConfig struct + MaxClockDrift time.Duration + TrustLevel ibctm.Fraction + TrustingPeriod time.Duration + UnbondingPeriod time.Duration + func NewTendermintConfig() *TendermintConfig + func (*TendermintConfig) GetClientType() string + type TestChain struct + App TestingApp + ChainID string + Codec codec.Codec + Coordinator *Coordinator + LatestCommittedHeader *ibctm.Header + NextVals *cmttypes.ValidatorSet + ProposedHeader cmtproto.Header + SendMsgsOverride func(msgs ...sdk.Msg) (*abci.ExecTxResult, error) + SenderAccount sdk.AccountI + SenderAccounts []SenderAccount + SenderPrivKey cryptotypes.PrivKey + Signers map[string]cmttypes.PrivValidator + TxConfig client.TxConfig + Vals *cmttypes.ValidatorSet + func NewTestChain(t *testing.T, coord *Coordinator, chainID string) *TestChain + func NewTestChainWithValSet(tb testing.TB, coord *Coordinator, chainID string, ...) *TestChain + func (chain *TestChain) CreateChannelCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID, channelID string) + func (chain *TestChain) CreatePortCapability(scopedKeeper capabilitykeeper.ScopedKeeper, portID string) + func (chain *TestChain) CreateTMClientHeader(chainID string, blockHeight int64, trustedHeight clienttypes.Height, ...) *ibctm.Header + func (chain *TestChain) CurrentTMClientHeader() *ibctm.Header + func (chain *TestChain) DeleteKey(key []byte) + func (chain *TestChain) ExpireClient(amount time.Duration) + func (chain *TestChain) GetAcknowledgement(packet channeltypes.Packet) []byte + func (chain *TestChain) GetChannelCapability(portID, channelID string) *capabilitytypes.Capability + func (chain *TestChain) GetClientLatestHeight(clientID string) exported.Height + func (chain *TestChain) GetClientState(clientID string) exported.ClientState + func (chain *TestChain) GetConsensusState(clientID string, height exported.Height) (exported.ConsensusState, bool) + func (chain *TestChain) GetContext() sdk.Context + func (chain *TestChain) GetPortCapability(portID string) *capabilitytypes.Capability + func (chain *TestChain) GetPrefix() commitmenttypes.MerklePrefix + func (chain *TestChain) GetSimApp() *simapp.SimApp + func (chain *TestChain) GetTimeoutHeight() clienttypes.Height + func (chain *TestChain) GetTimeoutTimestamp() uint64 + func (chain *TestChain) GetTrustedValidators(trustedHeight int64) (*cmttypes.ValidatorSet, error) + func (chain *TestChain) IBCClientHeader(header *ibctm.Header, trustedHeight clienttypes.Height) (*ibctm.Header, error) + func (chain *TestChain) NextBlock() + func (chain *TestChain) QueryConsensusStateProof(clientID string) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProof(key []byte) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProofAtHeight(key []byte, height int64) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryProofForStore(storeKey string, key []byte, height int64) ([]byte, clienttypes.Height) + func (chain *TestChain) QueryUpgradeProof(key []byte, height uint64) ([]byte, clienttypes.Height) + func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*abci.ExecTxResult, error) + type TestingApp interface + AppCodec func() codec.Codec + GetBaseApp func() *baseapp.BaseApp + GetIBCKeeper func() *keeper.Keeper + GetScopedIBCKeeper func() capabilitykeeper.ScopedKeeper + GetStakingKeeper func() ibctestingtypes.StakingKeeper + GetTxConfig func() client.TxConfig + LastBlockHeight func() int64 + LastCommitID func() storetypes.CommitID + func SetupTestingApp() (TestingApp, map[string]json.RawMessage) + func SetupWithGenesisValSet(tb testing.TB, valSet *cmttypes.ValidatorSet, ...) TestingApp Other modules containing this package github.com/h1uf/ibc-go/v9