Commit 105ba78
feat!: IBC v2 (#95)
* feat: bump up ibc-go from v8 to v10 (#51)
* bump up ibc-go from v8 to v10
- bumped up ibc-go from v8 to v10
- removed unused ibc test codes because bumping unused testing codes are wasting time. we should use ibc testing package instead.
* add ibc v1 transfer test
added ibc v1 test cases to make sure ExampleChain works with ibc v1.
disabled basefee param as default for ExampleChain to make test easier.
* add ibc v2 components (module, middleware)
- added ibc v2 components
- copied basic v2 test cases from ibc-go v10 to make sure v2 components of ExampleChain works well.
* add nil checks and convert erc20 keeper to interface in IBCMiddleware
- added nil checks for app and keeper in NewIBCMiddleware to prevent nil pointer dereference.
- changed erc20 keeper from struct to interface type to enable proper nil checking.
* copy and modify from ibc-go testing
To test certain key scenarios involving EVM messages (e.g., deploying an ERC20 contract), we needed a block header context with a proposer address. This required:
- A custom `TestChain` to handle these messages.
- A custom `SignAndDeliver` function to support the transaction signing and delivery process.
- A custom `Coordinator` to integrate this tailored `TestChain`.
Since `TestChain` and `SignAndDeliver` are directly or indirectly tied to most components in the testing package, and ibc-go cannot use a `TestChain` struct defined in our separate package, we had to copy and adapt nearly all related files to ensure compatibility and functionality.
* fix: ci issues
* replace deprecated functions
* revert disable base fee
Disabling the base fee to simplify testing is not ideal for a reference chain intended for developers building EVM-compatible chains. Ethereum relies on a fee market mechanism, and as a reference implementation, this chain should enable it by default to align with expected behavior.
* update TestGetReceivedCoin
Updated TestGetReceivedCoin to use the newly introduced interface instead of hardcoded strings.
This improves maintainability by making the test logic more aligned with the actual send/receive flow.
It also enhances readability and helps developers better understand how denoms are constructed and handled in real IBC transfers.
* bump up ibc-go from v10.1.0 to v10.1.1
* tests: add ibc test cases (#63)
* add basic test cases for ibc middleware v1, v2
more test cases will be added.
* add test cases for ibc middleware v2
* add test cases for ibc middleware v1 and post state check
* add OnAcknowledgementPacket tc for v1 ibc middleware
* add OnTimeoutPacket tc for v1 ibc middleware
* chore: unify variable names
* use internal testing pkg and add TestOnRecvPacketNativeErc20 tc
* add v1 tcs for handling erc20 native coin
OnTimeoutPacket, OnAcknowledgementPacket
* refactor v1 middleware test codes
* apply gci
* fix ci: receiver name should be same
* fix ci: unify receiver name
and also update comments and variable name
* fix ci: run gofumpt and remove tc copy
* test: update TestOnRecvPacket
make sure whether it is registered as dynamic precompiled contract or not
* chore: test suite name convention
* fix!: replace erc20 prefix (#92)
* replace erc20 native coin's prefix
from: erc20/
to: erc20
* change prefix to erc20:
* don't allow legacy format
ValidateErc20Denom is not used anywhere except test code, but what if it is used from somewhere else in the future?
We shouldn't treat legacy format as valid.
* fix!: ensure ics20 precompile on ibc v1 and v2 and add test cases (#74)
* test: WIP debugging ibc e2e test
* fix: ics20 precompile receiver addr to bech32, not bech32
* test: add erc20 case for ics20 v1 e2e test
(cherry picked from commit 2737b63160d9cefcad52cf86048638a861a478a5)
* test: add ibc v2 relayer logic on testing package, add v2 ics20 precompile test cases
(cherry picked from commit 886fdb7581cdcd0dcce15592aae0d8206e78a783)
* chore: fix lint Useless assignment to local variable
* fix!: denom trace to denom for ibc v8 -> v10 breaking changes
* fix!: tmp cherry-pick to remove erc20/ Prefix in Native ERC20 Coin Denoms #92
320236a
* test: add native erc20 case on ics20 precompile e2e test
(cherry picked from commit d8db271978f9a23d26a7c180ff8d7ec5edccc643)
* chore: fix lint
(cherry picked from commit 0d998cefc0c5bb57c396c01544b3ebe610f8a510)
* fix: update comments on ics20.sol
* refactor: Improve variable name clarity, apply suggestions
* Revert "fix!: tmp cherry-pick to remove erc20/ Prefix in Native ERC20 Coin Denoms #92"
This reverts commit e5afb56.
* chore: update omitted contracts json by make contracts-all
* docs: update CHANGELOG.md
* tests: add erc20 native coin test cases for ibc v2 middleware (#96)
* add OnRecvPacketNativeERC20 test case
test scenario where evm chain receives erc20 native coin through IBC
* add OnTimeoutPacketNativeERC20 test case
* fix ci and comments
* fix test case
* fix: apply review comments, add testcases, error handling
---------
Co-authored-by: Hyunwoo Lee <124245155+zsystm@users.noreply.github.com>
Co-authored-by: Vlad J <vladjdk@gmail.com>1 parent ff9b273 commit 105ba78
File tree
86 files changed
+6410
-1607
lines changed- ante/evm
- cmd/evmd/cmd
- contracts
- evmd
- ante
- eips/testdata
- testutil
- ibc
- testing
- precompiles
- erc20
- ics20
- testutil
- contracts
- tests/ibc
- testutil
- integration
- common/network
- ibc
- chain
- coordinator
- os
- network
- utils
- network
- tx
- utils
- x
- erc20
- keeper
- types
- v2
- ibc/transfer
- keeper
- types
- v2
- vm/types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
86 files changed
+6410
-1607
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | 54 | | |
61 | 55 | | |
62 | 56 | | |
| |||
68 | 62 | | |
69 | 63 | | |
70 | 64 | | |
71 | | - | |
72 | | - | |
| 65 | + | |
| 66 | + | |
73 | 67 | | |
74 | 68 | | |
75 | 69 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
174 | | - | |
175 | 174 | | |
176 | 175 | | |
177 | 176 | | |
| |||
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
191 | | - | |
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
| |||
202 | 200 | | |
203 | 201 | | |
204 | 202 | | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
| 203 | + | |
| 204 | + | |
209 | 205 | | |
210 | 206 | | |
211 | 207 | | |
| |||
287 | 283 | | |
288 | 284 | | |
289 | 285 | | |
290 | | - | |
291 | | - | |
292 | | - | |
| 286 | + | |
| 287 | + | |
293 | 288 | | |
294 | 289 | | |
295 | 290 | | |
296 | 291 | | |
297 | 292 | | |
298 | 293 | | |
299 | 294 | | |
300 | | - | |
301 | 295 | | |
302 | 296 | | |
303 | 297 | | |
| |||
318 | 312 | | |
319 | 313 | | |
320 | 314 | | |
321 | | - | |
322 | 315 | | |
323 | 316 | | |
324 | 317 | | |
| |||
335 | 328 | | |
336 | 329 | | |
337 | 330 | | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 331 | | |
348 | 332 | | |
349 | 333 | | |
| |||
449 | 433 | | |
450 | 434 | | |
451 | 435 | | |
452 | | - | |
| 436 | + | |
453 | 437 | | |
454 | | - | |
455 | 438 | | |
456 | | - | |
457 | 439 | | |
458 | 440 | | |
459 | 441 | | |
| |||
522 | 504 | | |
523 | 505 | | |
524 | 506 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
529 | 515 | | |
530 | 516 | | |
531 | 517 | | |
532 | 518 | | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | 519 | | |
537 | 520 | | |
538 | 521 | | |
| |||
553 | 536 | | |
554 | 537 | | |
555 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
556 | 543 | | |
557 | 544 | | |
558 | 545 | | |
| 546 | + | |
| 547 | + | |
559 | 548 | | |
560 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
561 | 559 | | |
562 | 560 | | |
563 | 561 | | |
| |||
588 | 586 | | |
589 | 587 | | |
590 | 588 | | |
591 | | - | |
592 | 589 | | |
593 | 590 | | |
594 | 591 | | |
| |||
602 | 599 | | |
603 | 600 | | |
604 | 601 | | |
605 | | - | |
| 602 | + | |
606 | 603 | | |
607 | 604 | | |
608 | 605 | | |
| |||
642 | 639 | | |
643 | 640 | | |
644 | 641 | | |
645 | | - | |
| 642 | + | |
646 | 643 | | |
647 | 644 | | |
648 | 645 | | |
| |||
663 | 660 | | |
664 | 661 | | |
665 | 662 | | |
666 | | - | |
| 663 | + | |
667 | 664 | | |
668 | 665 | | |
669 | 666 | | |
| |||
679 | 676 | | |
680 | 677 | | |
681 | 678 | | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | 679 | | |
686 | | - | |
| 680 | + | |
687 | 681 | | |
688 | 682 | | |
689 | 683 | | |
| |||
740 | 734 | | |
741 | 735 | | |
742 | 736 | | |
743 | | - | |
744 | 737 | | |
745 | 738 | | |
746 | 739 | | |
| |||
1000 | 993 | | |
1001 | 994 | | |
1002 | 995 | | |
1003 | | - | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
1007 | | - | |
1008 | 996 | | |
1009 | 997 | | |
1010 | 998 | | |
| |||
1015 | 1003 | | |
1016 | 1004 | | |
1017 | 1005 | | |
1018 | | - | |
1019 | | - | |
1020 | | - | |
1021 | | - | |
1022 | | - | |
1023 | 1006 | | |
1024 | 1007 | | |
1025 | 1008 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
30 | 42 | | |
31 | 43 | | |
32 | 44 | | |
| |||
0 commit comments