Skip to content

Commit

Permalink
Add tokenless tests (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
anhductn2001 authored Dec 23, 2024
1 parent 7a0df1b commit 120c7cc
Show file tree
Hide file tree
Showing 7 changed files with 801 additions and 24 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,15 @@ e2e-test-fraud-detection-da-p2p-evm: clean-e2e
e2e-test-erc20-rollapp-to-hub-new-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestERC20RollAppToHubNewRegister_EVM .

e2e-test-tokenless-create-erc20-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestTokenlessCreateERC20_EVM .

e2e-test-tokenless-transfer-success-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestTokenlessTransferSuccess_EVM .

e2e-test-tokenless-transfer-diff-gas-evm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestTokenlessTransferDiffGas_EVM .

# Executes IBC tests via rollup-e2e-testing
e2e-test-ibc-success-wasm: clean-e2e
cd tests && go test -timeout=45m -race -v -run TestIBCTransferSuccess_Wasm .
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ replace (

require (
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869
github.com/decentrio/rollup-e2e-testing v0.0.0-20241218041247-d03d7fef7544
github.com/decentrio/rollup-e2e-testing v0.0.0-20241220064322-31dd72989026
github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20241016085626-2b8c8898058b
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869 h1:qWpUYGOsrSC+1Vmd2TjhbsSpntvvx9PsX3AoeMunFxc=
github.com/decentrio/e2e-testing-live v0.0.0-20240718080249-ee255229c869/go.mod h1:HZNYnPwmSxkwTPjSD5yolauc1Vx1ZzKL4FFMxTq4H5Y=
github.com/decentrio/rollup-e2e-testing v0.0.0-20241218041247-d03d7fef7544 h1:b1izOB8UFpzcC4ESNvTvGVV8NZnuG3VKFlaeJvqSsGQ=
github.com/decentrio/rollup-e2e-testing v0.0.0-20241218041247-d03d7fef7544/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/decentrio/rollup-e2e-testing v0.0.0-20241220064322-31dd72989026 h1:wxRixOHD8MIRNc+7e2u1H/5T8fKxyECNIdv3BGpYEP8=
github.com/decentrio/rollup-e2e-testing v0.0.0-20241220064322-31dd72989026/go.mod h1:QmBrZgZplhtgHRWC0Z7LC7TDsKuC8sDyQvZyXXaqw/c=
github.com/deckarep/golang-set/v2 v2.1.0 h1:g47V4Or+DUdzbs8FxCCmgb6VYd+ptPAngjM6dtGktsI=
github.com/deckarep/golang-set/v2 v2.1.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4=
github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y=
Expand Down
5 changes: 5 additions & 0 deletions tests/data/native_denom_tokenless.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"display": "DYM",
"base": "ibc/FECACB927EB3102CCCB240FFB3B6FCCEEB8D944C6FEA8DFF079650FEFF59781D",
"exponent": 18
}
6 changes: 3 additions & 3 deletions tests/fullnode_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// StartDA start grpc DALC server
func StartDA(ctx context.Context, t *testing.T, client *client.Client, net string) {
fmt.Println("Starting pull image ...")
out, err := client.ImagePull(ctx, "ghcr.io/decentrio/dymint:srene-hardfork-fix", types.ImagePullOptions{})
out, err := client.ImagePull(ctx, "ghcr.io/dymensionxyz/dymint:latest", types.ImagePullOptions{})
require.NoError(t, err)
defer out.Close()

Expand Down Expand Up @@ -63,8 +63,8 @@ func StartDA(ctx context.Context, t *testing.T, client *client.Client, net strin
resp, err := client.ContainerCreate(
ctx,
&container.Config{
Image: "ghcr.io/decentrio/dymint:srene-hardfork-fix", // Image to run
Tty: true, // Attach to a TTY
Image: "ghcr.io/dymensionxyz/dymint:latest", // Image to run
Tty: true, // Attach to a TTY
},
hostConfig, networkConfig, nil, "grpc-da-container",
)
Expand Down
18 changes: 0 additions & 18 deletions tests/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,13 @@ import (
"github.com/icza/dyno"
"github.com/stretchr/testify/require"

banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
denommetadatatypes "github.com/dymensionxyz/dymension/v3/x/denommetadata/types"
eibc "github.com/dymensionxyz/dymension/v3/x/eibc/types"
rollapp "github.com/dymensionxyz/dymension/v3/x/rollapp/types"
ethermintcrypto "github.com/evmos/ethermint/crypto/codec"
ethermint "github.com/evmos/ethermint/types"
)

var rollappDenomMetadata = banktypes.Metadata{
Description: "Denom of the rollapp",
Base: "urax",
Display: "RAX",
Name: "RAX",
Symbol: "urax",
DenomUnits: []*banktypes.DenomUnit{
{
Denom: "urax",
Exponent: 0,
}, {
Denom: "RAX",
Exponent: 18,
},
},
}

type memoData struct {
denommetadatatypes.MemoData
User *userData `json:"user,omitempty"`
Expand Down
Loading

0 comments on commit 120c7cc

Please sign in to comment.