Documentation ¶
Index ¶
- Variables
- func CopyConnectionAndClientToPath(path *ibctesting.Path, pathToCopy *ibctesting.Path) *ibctesting.Path
- func CreateRandomAccounts(numAccts int) []sdk.AccAddress
- func NewIcaPath(chainA *ibctesting.TestChain, chainB *ibctesting.TestChain) *ibctesting.Path
- func NewTransferPath(chainA *ibctesting.TestChain, chainB *ibctesting.TestChain) *ibctesting.Path
- type AppTestHelper
- func (s *AppTestHelper) CompareCoins(expectedCoin sdk.Coin, actualCoin sdk.Coin, msg string)
- func (s *AppTestHelper) CreateICAChannel(owner string) string
- func (s *AppTestHelper) CreateTransferChannel(hostChainID string)
- func (s *AppTestHelper) Ctx() sdk.Context
- func (s *AppTestHelper) FundAccount(acc sdk.AccAddress, amount sdk.Coin)
- func (s *AppTestHelper) FundModuleAccount(moduleName string, amount sdk.Coin)
- func (s *AppTestHelper) GetIBCDenomTrace(denom string) transfertypes.DenomTrace
- func (s *AppTestHelper) HostCtx() sdk.Context
- func (s *AppTestHelper) ICAPacketAcknowledgement(msgs []sdk.Msg, msgResponse *proto.Message) channeltypes.Acknowledgement
- func (s *AppTestHelper) ICS20PacketAcknowledgement() channeltypes.Acknowledgement
- func (s *AppTestHelper) MarshalledICS20PacketData() sdk.AccAddress
- func (s *AppTestHelper) RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string)
- func (s *AppTestHelper) Setup()
- func (s *AppTestHelper) SetupIBCChains(hostChainID string)
Constants ¶
This section is empty.
Variables ¶
var ( StrideChainID = "STRIDE" TestIcaVersion = string(icatypes.ModuleCdc.MustMarshalJSON(&icatypes.Metadata{ Version: icatypes.Version, ControllerConnectionId: ibctesting.FirstConnectionID, HostConnectionId: ibctesting.FirstConnectionID, Encoding: icatypes.EncodingProtobuf, TxType: icatypes.TxTypeSDKMultiMsg, })) )
Functions ¶
func CopyConnectionAndClientToPath ¶ added in v0.5.1
func CopyConnectionAndClientToPath(path *ibctesting.Path, pathToCopy *ibctesting.Path) *ibctesting.Path
In ibctesting, there's no easy way to create a new channel on an existing connection To get around this, this helper function will copy the client/connection info from an existing channel We use this when creating ICA channels, because we want to reuse the same connections/clients from the transfer channel
func CreateRandomAccounts ¶
func CreateRandomAccounts(numAccts int) []sdk.AccAddress
Generate random account addresss
func NewIcaPath ¶ added in v0.5.1
func NewIcaPath(chainA *ibctesting.TestChain, chainB *ibctesting.TestChain) *ibctesting.Path
Creates an ICA channel between two chains
func NewTransferPath ¶ added in v0.5.1
func NewTransferPath(chainA *ibctesting.TestChain, chainB *ibctesting.TestChain) *ibctesting.Path
Creates a transfer channel between two chains
Types ¶
type AppTestHelper ¶
type AppTestHelper struct { suite.Suite App *app.StrideApp HostApp *simapp.SimApp IbcEnabled bool Coordinator *ibctesting.Coordinator StrideChain *ibctesting.TestChain HostChain *ibctesting.TestChain TransferPath *ibctesting.Path QueryHelper *baseapp.QueryServiceTestHelper TestAccs []sdk.AccAddress IcaAddresses map[string]string }
func (*AppTestHelper) CompareCoins ¶
Helper function to compare coins with a more legible error
func (*AppTestHelper) CreateICAChannel ¶ added in v0.5.1
func (s *AppTestHelper) CreateICAChannel(owner string) string
Creates an ICA channel through ibctesting Also creates a transfer channel is if hasn't been done yet
func (*AppTestHelper) CreateTransferChannel ¶ added in v0.5.1
func (s *AppTestHelper) CreateTransferChannel(hostChainID string)
Creates clients, connections, and a transfer channel between stride and a host chain
func (*AppTestHelper) Ctx ¶
func (s *AppTestHelper) Ctx() sdk.Context
Dynamically gets the context of the Stride Chain
func (*AppTestHelper) FundAccount ¶
func (s *AppTestHelper) FundAccount(acc sdk.AccAddress, amount sdk.Coin)
Mints and sends coins to a user account
func (*AppTestHelper) FundModuleAccount ¶
func (s *AppTestHelper) FundModuleAccount(moduleName string, amount sdk.Coin)
Mints coins directly to a module account
func (*AppTestHelper) GetIBCDenomTrace ¶ added in v0.5.1
func (s *AppTestHelper) GetIBCDenomTrace(denom string) transfertypes.DenomTrace
Get an IBC denom from it's native host denom This assumes the transfer channel is channel-0
func (*AppTestHelper) HostCtx ¶ added in v0.5.1
func (s *AppTestHelper) HostCtx() sdk.Context
Dynamically gets the context of the Host Chain
func (*AppTestHelper) ICAPacketAcknowledgement ¶ added in v0.5.1
func (s *AppTestHelper) ICAPacketAcknowledgement(msgs []sdk.Msg, msgResponse *proto.Message) channeltypes.Acknowledgement
func (*AppTestHelper) ICS20PacketAcknowledgement ¶ added in v0.5.1
func (s *AppTestHelper) ICS20PacketAcknowledgement() channeltypes.Acknowledgement
func (*AppTestHelper) MarshalledICS20PacketData ¶ added in v0.5.1
func (s *AppTestHelper) MarshalledICS20PacketData() sdk.AccAddress
func (*AppTestHelper) RegisterInterchainAccount ¶ added in v0.5.1
func (s *AppTestHelper) RegisterInterchainAccount(endpoint *ibctesting.Endpoint, owner string)
Register's a new ICA account on the next channel available This function assumes a connection already exists
func (*AppTestHelper) SetupIBCChains ¶ added in v0.5.1
func (s *AppTestHelper) SetupIBCChains(hostChainID string)
Initializes a ibctesting coordinator to keep track of Stride and a host chain's state