Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Ethereum router #16

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Adds Ethereum router #16

merged 2 commits into from
Nov 6, 2023

Conversation

claravanstaden
Copy link
Collaborator

Adds Ethereum xcm router to the asset hub config.

@claravanstaden claravanstaden marked this pull request as ready for review November 4, 2023 13:23
@claravanstaden claravanstaden mentioned this pull request Nov 4, 2023
@claravanstaden
Copy link
Collaborator Author

Tested:

  • register token
  • send token
  • transfer token
  • create agent
  • create channel

Routing from Ethereum -> Bridge Hub -> Asset Hub and Asset Hub -> Bridge Hub -> Ethereum works with the new router config.

Copy link

@alistair-singh alistair-singh left a comment

Choose a reason for hiding this comment

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

🚀

@claravanstaden claravanstaden merged commit 7119760 into snowbridge Nov 6, 2023
9 of 16 checks passed
@claravanstaden claravanstaden deleted the clara/ethereum-router branch November 6, 2023 08:03
claravanstaden added a commit that referenced this pull request Nov 15, 2023
* add test for asset-reserve and fee-reserve both at destination

* add test for asset-reserve and fee-reserve both at remote chain

* add test for asset-reserve at destination while fee-reserve is local

* add test for asset local-reserve while fee-reserve is destination

* add test for asset local-reserve while fee-reserve is remote chain

* refactor tests using better naming and conceptual examples

* add test for asset destination-reserve while fee-reserve is remote chain

* fix some typos

* deduplicate code for do_teleport_assets()

* add test for asset local-reserve while teleporting fees

* add test for asset destination-reserve while teleporting fees

* fix cases when asset reserve is remote, add test remote-asset and teleported fee

* add test for transfer asset remote reserve and fee local reserve

* add test for transfer asset remote reserve and fee destination reserve

* disallow teleportable assets in reserve-transfer, add regression test

* asset-hubs: fix emulated tests and deduplicate code

* asset-hubs: use non-system para IDs in tests where non-system paras are intended

* pallet-xcm: refactor newly added tests

* pallet-xcm: fix benchmarks

* fix pallet-xcm benchmarks for all runtimes

* address review comments

* expose TransferType through XcmExecutor::traits::AssetTransferSupport instead of pallet_xcm

* allow transfer for non-fungible assets too

* fix merge damage

* fmt

* pallet-xcm: split asset transfer tests to own file

* address review comments

* pallet-xcm: disallow combining remote reserves with other xfer types

* xcm-barriers: allow SetFeesMode in BuyExecution barrier and fix tests

* adds message queue pallet

* adds outbound queue

* fix compiler errors

* adds snowbridge to rococo bridgehub

* asset hub rococo

* asset hub rococo

* finishing up applying changes

* fix incorrect pallet-xcm imports

* verify assets and beneficiary in over-bridge test

* fix AHs tests

* AHs: fix emulated tests

* AHs: include delivery-fee checking in tests

* fix runtime-benchmarks for AHRococo

* fix clippy

* fixing tests

* adds upstream changes

* cleanup comments, fix upgrade gateway test

* withdraw fees before buyexecution - still broken because of executor appended ClearOrigin

* pallet-xcm: uses single custom XCM to send both fees and assets

* pallet-xcm: handle teleport checking account when custom burn+teleport

* fixes plus tests

* fix pallet-xcm tests

* fix AHs tests

* attempts to fix xcm config

* fixes send token

* remove unused SetFeesMode instruction

* add missing import

* allows all networks

* fmt

* pallet-xcm: fix broken reserve_transfer_assets benchmark

* try add pallet-assets for benchmarking to rococo

* Revert "try add pallet-assets for benchmarking to rococo"

This reverts commit c82330b.

* pallet-xcm benchmarking: most chains do not have pallet-assets, use pallet-balances instead

* pallet-xcm: fix teleport_assets benchmark

* fix runtimes benchmarks for pallet-xcm

* AHs simplify test_cases_over_bridge

* runtimes: add dedicated benchmarking config for pallet-xcm

* AHs benchmarks: fix transfer to sibling parachain

* fixed token transfer test

* fixes after rebase

* fixes after rebase

* fixes after rebase

* Update polkadot/xcm/xcm-executor/src/traits/asset_transfer.rs

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>

* Update polkadot/xcm/pallet-xcm/src/lib.rs

Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>

* fmt

* Polkadot sdk update v2 (#3)

* adds message queue pallet

* adds outbound queue

* fix compiler errors

* adds snowbridge to rococo bridgehub

* asset hub rococo

* asset hub rococo

* finishing up applying changes

* fix incorrect pallet-xcm imports

* fixing tests

* adds upstream changes

* cleanup comments, fix upgrade gateway test

* attempts to fix xcm config

* fixes send token

* fmt

* fixes after rebase

* fixes after rebase

* correct relay network check

---------

Co-authored-by: claravanstaden <Cats 4 life!>

* Runtime changes for refactored outbound-queue pallet

* updates relay

* Update polkadot/xcm/xcm-builder/src/barriers.rs

Co-authored-by: Branislav Kontur <bkontur@gmail.com>

* Update polkadot/xcm/pallet-xcm/src/lib.rs

Co-authored-by: Branislav Kontur <bkontur@gmail.com>

* Update polkadot/xcm/pallet-xcm/src/lib.rs

Co-authored-by: Branislav Kontur <bkontur@gmail.com>

* Update polkadot/xcm/pallet-xcm/src/lib.rs

Co-authored-by: Branislav Kontur <bkontur@gmail.com>

* fmt

* Update bridge

* Add WeightToFee to inbound queue config

* remove comments

* Add back treasury account

* fix warnings

* Update for benchmark

* Update for benchmark

* xcm-emulator: configure penpal for asset transfers and enhance existing tests

* xcm-emulator: add relay to penpal native transfer test

* xcm-emulator: add ah to penpal native asset transfer test

* xcm: MultiLocation::chain_location() takes nonmut reference

* pallet-xcm: benchmarks: enforce single asset transfer at the api level

* xcm-executor: rename AssetTransferSupport to XcmAssetTransfer

* clippy

* fixes

* remove duplicated trait

* AssetHub tests: account for Westend higher delivery fees

* fix merge damage

* Added withdraw reserve to scripts

* bridge-hub-westend-runtime: fix benchmarks

* unknown import

* move AllowSiblingsOnly to core

* Adds transfer token user fee (#7)

* adds transfer token user fee

* updates fee calc

* starts with adding snowbridge conf

* updates fee

* correct ROC amount

* correct ROC amount

---------

Co-authored-by: claravanstaden <Cats 4 life!>

* Improve xcm integration test (#13)

* Fix tests

* Improve integration tests

* Add weight for update_fees

* remove gateway contract location

* fmt

* remove todos

* use the correct bridge config

* Enable utility calls

* xcm-emulator: add ah to penpal multiple mixed assets transfer test

* fix merge damage

* remove limited from test names, all transfers use limited method now

* barriers: allow withdrawing multiple assets in AllowTopLevelPaidExecutionFrom

* Rename to set_token_transfer_fees

* Adds Ethereum router (#16)

* configures ethereum router

* adds benchmarks and fmt

---------

Co-authored-by: claravanstaden <Cats 4 life!>

* fixed warning

* pallet-xcm: add trace logs

* fixes after merge

* fix runtime-benchmarks

* updated exporter

* pallet-xcm: fix tests

* increase fee

* tweaked fee

* xcm-emulator: remove unused pallet import

* xcm-barrier: enforce MAX_ASSETS_FOR_BUY_EXECUTION

* Change to Ethereum sovereign

* chore

* Tests for token transfer

* fix tests

* Support for message ids

* rename some variables and fns

* add explicit incomplete local execution error

* rename fns

* pallet-xcm: fix pallet extrinsic default weights

* fix some errors

* Update Cargo.lock

* working on new bridge config

* Fix assethub fee (#21)

* updates fee after fixing decimals

* adds fee in dot

* adds fee in ksm

* updates comment

---------

Co-authored-by: claravanstaden <Cats 4 life!>

* working on new bridge config

* progress on config

* pallet-xcm: also buy execution as part of custom fee handling

* pallet-xcm: fix lossy fees math

* fix merge damage

* Add commons crate for BridgeHub runtime

* fix merge damage

* Fix emulated tests

* fixes

* attempting to fix message queue things

* fix message queue things

* fixes

* Update Cargo.lock

* re-use pallet

* added fee handler trait

* whitespace

* move to treasury to snowbridge sovereign

* remove treasury

* remove TREASURY_PALLET_ID

* remove unused imports

* add fee trait

* fix error

* added full logic

* adds tests

* renamed trait

* use siblings

* address feedback

* add snowbridge-runtime-common

* fix build

* cleanup

* cleaner implementation

* cargo lock

* update cargo lock

* latest updates and fmt

* increases message queue sizes for beacon checkpoint

* updates pallet indices

* fixes

* move to runtime folder

* remove uneeded code

* remove snowbridge sovereign from tests

* use Balance

* added refund

* increased fee

* Not going to refund treasuries

* revert MessageQueueServiceWeight

* update from polkadot upstream

* update from polkadot and snowbridge upstream

* fix merge damage

* adds test back and fmt

* add channel-id support

* Fix breaking tests

---------

Co-authored-by: Adrian Catangiu <adrian@parity.io>
Co-authored-by: claravanstaden <Cats 4 life!>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Clara van Staden <claravanstaden64@gmail.com>
Co-authored-by: Branislav Kontur <bkontur@gmail.com>
Co-authored-by: ron <yrong1997@gmail.com>
Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants