diff --git a/go.mod b/go.mod index 911136ee..e7058a86 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( cosmossdk.io/math v1.3.0 github.com/cosmos/cosmos-sdk v0.46.16 github.com/cosmos/ibc-go/v6 v6.2.1 - github.com/decentrio/rollup-e2e-testing v0.0.0-20240325161106-405e71f46e86 + github.com/decentrio/rollup-e2e-testing v0.0.0-20240328103700-ec0ced492b06 github.com/dymensionxyz/dymension-rdk v1.1.0-beta github.com/dymensionxyz/dymension/v3 v3.0.0-rc02.0.20240321090214-067a132551ab github.com/evmos/ethermint v0.22.0 diff --git a/go.sum b/go.sum index 1c283b19..b4310d96 100644 --- a/go.sum +++ b/go.sum @@ -330,8 +330,8 @@ github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnG github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240325161106-405e71f46e86 h1:4ZfeMGU0KWbxSGeA0k9jss56DDZ+ddC9HKDYp5Y7Gu4= -github.com/decentrio/rollup-e2e-testing v0.0.0-20240325161106-405e71f46e86/go.mod h1:Hy/8P41OEKrlAatPG5NcD/BOWTa2s+laECwpZpmA9f0= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240328103700-ec0ced492b06 h1:QYPi8aNnU6XWnan4o2Cxd4/fL/brRTU9rogI53Ms27M= +github.com/decentrio/rollup-e2e-testing v0.0.0-20240328103700-ec0ced492b06/go.mod h1:Hy/8P41OEKrlAatPG5NcD/BOWTa2s+laECwpZpmA9f0= github.com/deckarep/golang-set v1.8.0 h1:sk9/l/KqpunDwP7pSjUg0keiOOLEnOBHzykLrsPppp4= github.com/deckarep/golang-set v1.8.0/go.mod h1:5nI87KwE7wgsBU1F4GKAw2Qod7p5kyS383rP6+o6qqo= github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= diff --git a/tests/rollapp_genesis_event_test.go b/tests/rollapp_genesis_event_test.go index 29e5b232..80c96283 100644 --- a/tests/rollapp_genesis_event_test.go +++ b/tests/rollapp_genesis_event_test.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "testing" - "time" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -155,18 +154,18 @@ func TestRollappGenesisEvent_EVM(t *testing.T) { require.Equal(t, new_params.Value, string(deployerWhitelistParams)) channel, err := ibc.GetTransferChannel(ctx, r, eRep, dymension.Config().ChainID, rollapp1.Config().ChainID) - if err != nil { - fmt.Println("error getting transfer channel: ", err) - time.Sleep(3000 * time.Second) - } - txHash, err := dymension.FullNodes[0].ExecTx(ctx, dymensionUserAddr, "rollapp", "genesis-event", rollapp1.GetChainID(), channel.ChannelID) + require.NoError(t, err) + + txHash, err := dymension.FullNodes[0].ExecTx(ctx, dymensionUserAddr, "rollapp", "genesis-event", rollapp1.GetChainID(), channel.ChannelID, "--gas=auto") require.NoError(t, err) tx, err := dymension.GetTransaction(txHash) require.NoError(t, err) - recipient, _ := cosmos.AttributeValue(tx.Events, "transfer", "recipient") - coinStr, _ := cosmos.AttributeValue(tx.Events, "transfer", "amount") + recipient, ok := cosmos.AttributeValue(tx.Events, "transfer", "recipient") + require.True(t, ok, "failed to retrieve transfer recipient") + coinStr, ok := cosmos.AttributeValue(tx.Events, "transfer", "amount") + require.True(t, ok, "failed to retrieve transfer amount") genesisCoin, err := sdk.ParseCoinNormalized(coinStr) require.NoError(t, err) @@ -215,4 +214,26 @@ func TestRollappGenesisEvent_EVM(t *testing.T) { require.NoError(t, err) testutil.AssertBalance(t, ctx, rollapp1, escrowAddress, rollapp1.Config().Denom, genesisCoin.Amount) + + denommetadata, err := dymension.GetNode().QueryDenomMetadata(ctx, genesisCoin.Denom) + require.NoError(t, err) + + require.Equal(t, denommetadata.Description, fmt.Sprintf("auto-generated metadata for %s from rollapp %s", genesisCoin.Denom, rollapp1.GetChainID())) + require.Equal(t, denommetadata.Base, genesisCoin.Denom) + denomUnits := []cosmos.DenomUnit{ + { + Denom: genesisCoin.Denom, + Exponent: 0, + Aliases: []string{rollapp1.Config().Denom}, + }, + { + Denom: "rax", + Exponent: 6, + Aliases: []string{}, + }, + } + require.Equal(t, denommetadata.DenomUnits, denomUnits) + require.Equal(t, denommetadata.Display, "rax") + require.Equal(t, denommetadata.Symbol, "URAX") + require.Equal(t, denommetadata.Name, fmt.Sprintf("%s %s", rollapp1.GetChainID(), rollapp1.Config().Denom)) } diff --git a/tests/setup.go b/tests/setup.go index 58c5cd78..1be1349c 100644 --- a/tests/setup.go +++ b/tests/setup.go @@ -52,7 +52,7 @@ var ( rollappEVMImage = ibc.DockerImage{ Repository: RollappEVMMainRepo, - Version: "7df6696f", + Version: rollappEVMVersion, UidGid: "1025:1025", } @@ -276,7 +276,7 @@ func GetDockerImageVersion() (dymensionVersion, rollappEVMVersion, rollappWasmVe rollappEVMVersion, found = os.LookupEnv("ROLLAPP_EVM_CI") if !found { - rollappEVMVersion = "7df6696f" + rollappEVMVersion = "latest" } rollappWasmVersion, found = os.LookupEnv("ROLLAPP_WASM_CI")