Skip to content

Commit 204ff4e

Browse files
zsystmAlex | Interchain Labsalmk-dev
authored
tests: evm tools compatibility (#287)
* add foundry uniswap v3 deploy test cases * add gitignore for foundry * exclude sol files in compatibility dir * add verbose flag to debug * fix script and ci yml * remove verbose tag * fix ci * add checking logic at testing script * shfmt ci-foundry-uniswap * bash lint * add foundry tc * clean deps * revert version * add tc for cast * lint * lint * add sdk viem tc * fix viem workflow * add web3 tc * add hardhat tc * lint * refactor: script and action file names * clean up * chore: fix typo at filename * fix typo and update chain-id * udpate chain id in tc --------- Co-authored-by: Alex | Interchain Labs <[email protected]> Co-authored-by: Abdul Malek <[email protected]>
1 parent a259976 commit 204ff4e

File tree

84 files changed

+22318
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+22318
-1
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Compatibility Tests for Foundry Uniswap V3
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'tests/evm-tools-compatibility/foundry-uniswap-v3/**'
8+
- '../../scripts/tests_compatibility_setup.sh'
9+
- '../../scripts/tests_compatibility_foundry_uniswap_v3.sh'
10+
- 'local_node.sh'
11+
- 'tests-compatibility-foundry-uniswap-v3.yml'
12+
pull_request:
13+
branches: [main, develop]
14+
paths:
15+
- 'tests/evm-tools-compatibility/foundry-uniswap-v3/**'
16+
- '../../scripts/tests_compatibility_setup.sh'
17+
- '../../scripts/tests_compatibility_foundry_uniswap_v3.sh'
18+
- 'local_node.sh'
19+
- 'tests-compatibility-foundry-uniswap-v3.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
foundry-uniswap-v3:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.22'
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y build-essential curl git
44+
45+
- name: Install Foundry
46+
uses: foundry-rs/foundry-toolchain@v1
47+
with:
48+
version: nightly
49+
50+
- name: Install Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
63+
- name: Build and install evmd
64+
run: |
65+
make install
66+
67+
- name: Run foundry-uniswap-v3 tests
68+
run: |
69+
chmod +x scripts/tests_compatibility_foundry_uniswap_v3.sh
70+
./scripts/tests_compatibility_foundry_uniswap_v3.sh --verbose
71+
env:
72+
COMPAT_DIR: ${{ github.workspace }}/tests/evm-tools-compatibility
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Compatibility Tests for Foundry
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'tests/evm-tools-compatibility/foundry/**'
8+
- '../../scripts/tests_compatibility_setup.sh'
9+
- '../../scripts/tests_compatibility_foundry.sh'
10+
- 'local_node.sh'
11+
- 'tests-compatibility-foundry.yml'
12+
pull_request:
13+
branches: [main, develop]
14+
paths:
15+
- 'tests/evm-tools-compatibility/foundry/**'
16+
- '../../scripts/tests_compatibility_setup.sh'
17+
- '../../scripts/tests_compatibility_foundry.sh'
18+
- 'local_node.sh'
19+
- 'tests-compatibility-foundry.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
foundry-compatibility:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.22'
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y build-essential curl git
44+
45+
- name: Install Foundry
46+
uses: foundry-rs/foundry-toolchain@v1
47+
with:
48+
version: nightly
49+
50+
- name: Install Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
63+
- name: Build and install evmd
64+
run: |
65+
make install
66+
67+
- name: Run foundry compatibility tests
68+
run: |
69+
chmod +x scripts/tests_compatibility_foundry.sh
70+
./scripts/tests_compatibility_foundry.sh --verbose
71+
env:
72+
COMPAT_DIR: ${{ github.workspace }}/tests/evm-tools-compatibility
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Compatibility Tests for Hardhat
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'tests/evm-tools-compatibility/hardhat/**'
8+
- '../../scripts/tests_compatibility_setup.sh'
9+
- '../../scripts/tests_compatibility_hardhat.sh'
10+
- 'local_node.sh'
11+
- 'tests-compatibility-hardhat.yml'
12+
pull_request:
13+
branches: [main, develop]
14+
paths:
15+
- 'tests/evm-tools-compatibility/hardhat/**'
16+
- '../../scripts/tests_compatibility_setup.sh'
17+
- '../../scripts/tests_compatibility_hardhat.sh'
18+
- 'local_node.sh'
19+
- 'tests-compatibility-hardhat.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
hardhat-compatibility:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.22'
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y build-essential curl git jq
44+
45+
- name: Install Foundry
46+
uses: foundry-rs/foundry-toolchain@v1
47+
with:
48+
version: nightly
49+
50+
- name: Install Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
63+
- name: Cache Node.js modules
64+
uses: actions/cache@v4
65+
with:
66+
path: tests/evm-tools-compatibility/hardhat/node_modules
67+
key: ${{ runner.os }}-node-${{ hashFiles('tests/evm-tools-compatibility/hardhat/package-lock.json') }}
68+
restore-keys: |
69+
${{ runner.os }}-node-
70+
71+
- name: Build and install evmd
72+
run: |
73+
make install
74+
75+
- name: Run hardhat compatibility tests
76+
run: |
77+
chmod +x scripts/tests_compatibility_hardhat.sh
78+
./scripts/tests_compatibility_hardhat.sh --verbose
79+
env:
80+
COMPAT_DIR: ${{ github.workspace }}/tests/evm-tools-compatibility
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Compatibility Tests for Viem
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'tests/evm-tools-compatibility/viem/**'
8+
- '../../scripts/tests_compatibility_setup.sh'
9+
- '../../scripts/tests_compatibility_viem.sh'
10+
- 'local_node.sh'
11+
- 'tests-compatibility-viem.yml'
12+
pull_request:
13+
branches: [main, develop]
14+
paths:
15+
- 'tests/evm-tools-compatibility/viem/**'
16+
- '../../scripts/tests_compatibility_setup.sh'
17+
- '../../scripts/tests_compatibility_viem.sh'
18+
- 'local_node.sh'
19+
- 'tests-compatibility-viem.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
viem-compatibility:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.22'
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y build-essential curl git jq
44+
45+
- name: Install Foundry
46+
uses: foundry-rs/foundry-toolchain@v1
47+
with:
48+
version: nightly
49+
50+
- name: Install Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
63+
- name: Cache Node.js modules
64+
uses: actions/cache@v4
65+
with:
66+
path: tests/evm-tools-compatibility/viem/node_modules
67+
key: ${{ runner.os }}-node-${{ hashFiles('tests/evm-tools-compatibility/viem/package-lock.json') }}
68+
restore-keys: |
69+
${{ runner.os }}-node-
70+
71+
- name: Build and install evmd
72+
run: |
73+
make install
74+
75+
- name: Run viem compatibility tests
76+
run: |
77+
chmod +x scripts/tests_compatibility_viem.sh
78+
./scripts/tests_compatibility_viem.sh --verbose
79+
env:
80+
COMPAT_DIR: ${{ github.workspace }}/tests/evm-tools-compatibility
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Compatibility Tests for Web3.js
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
paths:
7+
- 'tests/evm-tools-compatibility/web3.js/**'
8+
- '../../scripts/tests_compatibility_setup.sh'
9+
- '../../scripts/tests_compatibility_web3js.sh'
10+
- 'local_node.sh'
11+
- 'tests-compatibility-web3js.yml'
12+
pull_request:
13+
branches: [main, develop]
14+
paths:
15+
- 'tests/evm-tools-compatibility/web3.js/**'
16+
- '../../scripts/tests_compatibility_setup.sh'
17+
- '../../scripts/tests_compatibility_web3js.sh'
18+
- 'local_node.sh'
19+
- 'tests-compatibility-web3js.yml'
20+
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
web3js-compatibility:
26+
runs-on: ubuntu-latest
27+
timeout-minutes: 30
28+
29+
steps:
30+
- name: Checkout code
31+
uses: actions/checkout@v4
32+
with:
33+
submodules: recursive
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: '1.22'
39+
40+
- name: Install system dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y build-essential curl git jq
44+
45+
- name: Install Foundry
46+
uses: foundry-rs/foundry-toolchain@v1
47+
with:
48+
version: nightly
49+
50+
- name: Install Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '18'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: ~/go/pkg/mod
59+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
60+
restore-keys: |
61+
${{ runner.os }}-go-
62+
63+
- name: Cache Node.js modules
64+
uses: actions/cache@v4
65+
with:
66+
path: tests/evm-tools-compatibility/web3.js/node_modules
67+
key: ${{ runner.os }}-node-${{ hashFiles('tests/evm-tools-compatibility/web3.js/package-lock.json') }}
68+
restore-keys: |
69+
${{ runner.os }}-node-
70+
71+
- name: Build and install evmd
72+
run: |
73+
make install
74+
75+
- name: Run web3.js compatibility tests
76+
run: |
77+
chmod +x scripts/tests_compatibility_web3js.sh
78+
./scripts/tests_compatibility_web3js.sh --verbose
79+
env:
80+
COMPAT_DIR: ${{ github.workspace }}/tests/evm-tools-compatibility

0 commit comments

Comments
 (0)