Skip to content

Implement ethereum explicitly related currency swap logic to make Native-to-EVM Bridge transactions visible via Ethereum RPC#1449

Merged
dmitrylavrenov merged 102 commits intomasterfrom
pallet-visible-currency-swap
Mar 26, 2025
Merged

Implement ethereum explicitly related currency swap logic to make Native-to-EVM Bridge transactions visible via Ethereum RPC#1449
dmitrylavrenov merged 102 commits intomasterfrom
pallet-visible-currency-swap

Conversation

@dmitrylavrenov
Copy link
Contributor

@dmitrylavrenov dmitrylavrenov commented Feb 19, 2025

Design thoughts

Tasks

  • pallet implementation
  • precompile implementation
  • runtime integration
  • runtime unit tests
  • unit tests for native to evm swap
  • unit tests for evm to native swap
  • e2e tests for swap in both directions

P.S: do benchmarks at separate PR

PoC of visibility

transaction itself

Screenshot 2025-02-19 at 23 01 35

transaction execution in explorer on Substrate RPC side

Screenshot 2025-02-19 at 23 02 22

transaction execution in explorer on Ethereum RPC side

Very tiny ethereum explorer is used to verify visibility via Ethereum RPC

Screenshot 2025-02-19 at 23 02 43

@dmitrylavrenov dmitrylavrenov force-pushed the pallet-visible-currency-swap branch from d203de1 to c7c315c Compare February 20, 2025 09:36
Copy link
Contributor

@MOZGIII MOZGIII left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good!

If we add the E2E tests to verify that the solution works overall, and unit tests with mock runtime (as we usually do) to test the niche cases (zero transfer, etc) and for tight regression control - I think we ship it pretty much right away

@dmitrylavrenov dmitrylavrenov force-pushed the pallet-visible-currency-swap branch from 4c9425c to 01e492c Compare February 20, 2025 11:57
@dmitrylavrenov dmitrylavrenov force-pushed the pallet-visible-currency-swap branch from f48f89e to 863a9aa Compare February 20, 2025 14:14
@MOZGIII
Copy link
Contributor

MOZGIII commented Feb 20, 2025

Thinking about this, we should explicitly test, among other things, that the pot doesn't pay the fee for any tx with this flow.

@dmitrylavrenov
Copy link
Contributor Author

Thinking about this, we should explicitly test, among other things, that the pot doesn't pay the fee for any tx with this flow.

Tested manually that pot doesn't pay the fee - confirmed. Additionally will implement some unit tests and add this check to e2e test.

@dmitrylavrenov dmitrylavrenov force-pushed the pallet-visible-currency-swap branch 9 times, most recently from b0e68a8 to 40e11f7 Compare February 24, 2025 15:09
@MOZGIII MOZGIII self-requested a review February 24, 2025 19:43
@dmitrylavrenov dmitrylavrenov force-pushed the pallet-visible-currency-swap branch from e8980fc to 01643bd Compare March 26, 2025 06:06
@dmitrylavrenov dmitrylavrenov added this pull request to the merge queue Mar 26, 2025
Merged via the queue into master with commit bd09943 Mar 26, 2025
21 checks passed
@dmitrylavrenov dmitrylavrenov deleted the pallet-visible-currency-swap branch March 26, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants