Skip to content

Commit

Permalink
Add IBC demon metadata transfer integration test.
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryhil committed Nov 5, 2024
1 parent c5b82a8 commit 1d484e3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions integration-tests/ibc/transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,12 @@ func TestIBCTransferFromGaiaToCoreumAndBack(t *testing.T) {
requireT := require.New(t)

ctx, chains := integrationtests.NewChainsTestingContext(t)

coreumChain := chains.Coreum
gaiaChain := chains.Gaia

coreumBankClient := banktypes.NewQueryClient(coreumChain.ClientContext)

coreumToGaiaChannelID := coreumChain.AwaitForIBCChannelID(
ctx, t, ibctransfertypes.PortID, gaiaChain.ChainContext,
)
Expand Down Expand Up @@ -134,6 +137,13 @@ func TestIBCTransferFromGaiaToCoreumAndBack(t *testing.T) {
)
requireT.NoError(coreumChain.AwaitForBalance(ctx, t, coreumToCoreumSender, expectedBalanceAtCoreum))

// check that denom metadata is registered
denomMetadataRes, err := coreumBankClient.DenomMetadata(ctx, &banktypes.QueryDenomMetadataRequest{
Denom: expectedBalanceAtCoreum.Denom,
})
requireT.NoError(err)
assert.Equal(t, expectedBalanceAtCoreum.Denom, denomMetadataRes.Metadata.Base)

// Send from coreumToCoreumSender to coreumToGaiaSender
sendMsg := &banktypes.MsgSend{
FromAddress: coreumToCoreumSender.String(),
Expand All @@ -148,8 +158,7 @@ func TestIBCTransferFromGaiaToCoreumAndBack(t *testing.T) {
)
requireT.NoError(err)

bankClient := banktypes.NewQueryClient(coreumChain.ClientContext)
queryBalanceResponse, err := bankClient.Balance(ctx, &banktypes.QueryBalanceRequest{
queryBalanceResponse, err := coreumBankClient.Balance(ctx, &banktypes.QueryBalanceRequest{
Address: coreumToGaiaSender.String(),
Denom: expectedBalanceAtCoreum.Denom,
})
Expand Down

0 comments on commit 1d484e3

Please sign in to comment.