Skip to content

Commit

Permalink
Add IBC demon metadata transfer integration test. (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitryhil authored Nov 6, 2024
1 parent d0fc42e commit f4ed2d1
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 f4ed2d1

Please sign in to comment.