Commit fb7e407
authored
refactor: fully decouple evm from evmd (#229)
* tests: add ics20 precompile tests and refactor test utils
- Make gas limit configurable for testing lower gas limit scenario
- Get ibctesting.AppCreator when create coordinator, so other applications can leverage this test suits.
- Make GenerateContractCallArgs as separate function. This doens't have to be a member method of TxFactory implementation. un-necessary dependency.
- SendEvmTx now supports contract creation.
* fix ibc test suite and ics20 tx vulnerability
Previous ibc test suite uses different bond denom ("stake) with EVM denom ("aatom"). Even though it could be different technically, but we need to make sure everything works correctly with default config (bond denom == evm denom).
Wit this commit, we can make sure IBC and ICS20 transfers with default config should work well.
Updated test util for writing test cases more easily.
* add revert test case
* fix lint
* implement safeCopyInputs and add query test case
Currently, Arguments.Copy in geth panics if there are type mismatch. Returning error instead makes more sense
* refactor: decouple evm from evmd and relocate evmd-specific tests
- Moved shared test/data files from evmd to evm to eliminate evm → evmd dependency
- Relocated evmd-bound tests that directly depend on App implementation into evmd/
- Refactored remaining evmd-dependent tests to use EvmApp interface instead
- Updated Makefile to reflect cmd relocation under evmd/
* fix ci and update test-helper's config path
* resolve conflicts after merge upstream
* nit: changed filename
Variables in evmd_config.go are defined for serving evmd
* chore: update importing package name
* Refactor: relocate evmd-specific configurations and add test counterparts
Moved evmd-specific app configurations under the evmd/ directory to improve modularity and maintain clearer separation between evmd and other components.
Introduced corresponding configuration files under testutil/ to support test applications, since relocating the original files required new equivalents for testing purposes.
* Refactor: relocate app specific ante handler
* fix solidity test config path
* chore: update import package name1 parent 09e1895 commit fb7e407
File tree
69 files changed
+886
-494
lines changed- ante/evm
- cmd/evmd/config
- evmd
- ante
- cmd/evmd
- cmd
- config
- eips
- tests
- ibc
- integration
- eips
- ledger
- mocks
- network
- server
- tests
- integration
- eip712
- precompiles
- bech32
- distribution
- ics20
- rpc/backend
- x
- erc20
- precisebank
- vm
- solidity
- testutil
- config
- constants
- ibc
- x
- erc20/types
- precisebank/keeper
- vm/types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
69 files changed
+886
-494
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
6 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
7 | 15 | | |
8 | | - | |
9 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
10 | 23 | | |
11 | 24 | | |
12 | 25 | | |
13 | 26 | | |
14 | 27 | | |
15 | | - | |
16 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
17 | 31 | | |
18 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
19 | 35 | | |
20 | 36 | | |
21 | | - | |
| 37 | + | |
22 | 38 | | |
23 | 39 | | |
24 | 40 | | |
| |||
71 | 87 | | |
72 | 88 | | |
73 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
74 | 95 | | |
75 | | - | |
76 | | - | |
77 | | - | |
| 96 | + | |
78 | 97 | | |
79 | 98 | | |
80 | 99 | | |
81 | | - | |
82 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
83 | 105 | | |
84 | 106 | | |
85 | 107 | | |
86 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
87 | 113 | | |
88 | 114 | | |
89 | 115 | | |
| |||
101 | 127 | | |
102 | 128 | | |
103 | 129 | | |
| 130 | + | |
104 | 131 | | |
105 | 132 | | |
106 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
| 60 | + | |
62 | 61 | | |
63 | | - | |
| 62 | + | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
| |||
This file was deleted.
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
144 | | - | |
| 145 | + | |
145 | 146 | | |
146 | | - | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
Lines changed: 18 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | | - | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
| 94 | + | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
107 | | - | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
119 | 120 | | |
120 | 121 | | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
0 commit comments