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

Snowbridge v2 - Outbound Queue #6706

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d359108
Merge from master
yrong Nov 11, 2024
4d6c678
Fix v2 tests
yrong Nov 11, 2024
a72aa5a
Fix compile
yrong Nov 11, 2024
cf8a9c3
Merge branch 'master' into outbound-queue-v2
yrong Nov 14, 2024
056fd7f
Rename to OutboundQueueV2Api
yrong Nov 14, 2024
49837cf
Return raw balance for dry run
yrong Nov 14, 2024
030d95c
Decode account asap
yrong Nov 14, 2024
206b300
Revamp comments for V2
yrong Nov 14, 2024
8b3e178
Custom digest for V2
yrong Nov 14, 2024
a22f0ac
Cleanup imports
yrong Nov 14, 2024
e346bf6
Update bridges/snowbridge/pallets/outbound-queue-v2/src/types.rs
yrong Nov 14, 2024
9847bc9
Clean up with the insert
yrong Nov 14, 2024
fb3b30c
Remove Fee for V2
yrong Nov 14, 2024
83b6ff8
Reorgnize InboundMessage to abi module
yrong Nov 14, 2024
f08e36e
Seperate XcmConverter
yrong Nov 14, 2024
cff1cba
Merge branch 'master' into outbound-queue-v2
yrong Nov 15, 2024
faf25e9
Merge branch 'snowbridge-v2' into outbound-queue-v2
yrong Nov 17, 2024
af928ba
Support multiple commands in one message
yrong Nov 19, 2024
d5ab77b
Rename to InvalidPendingNonce & Cleanup
yrong Nov 19, 2024
f96a6fc
Improve comment
yrong Nov 19, 2024
d4910ea
Fix breaking tests
yrong Nov 20, 2024
7586a28
Merge branch 'snowbridge-v2' into outbound-queue-v2
yrong Nov 20, 2024
8e80315
Remove Inbound-queue V2 completely
yrong Nov 20, 2024
e8951e4
Reorgnize code layout
yrong Nov 20, 2024
2a41399
For Transact
yrong Nov 22, 2024
66afb07
Transact support
yrong Nov 23, 2024
78da35b
Remove irrelevant changes
yrong Nov 24, 2024
4808c36
Validate fee asset is always in WETH
yrong Nov 24, 2024
84cbb93
Check ether value is sufficient
yrong Nov 24, 2024
ec6ceb8
Merge branch 'master' into outbound-queue-v2
yrong Nov 25, 2024
4190bf0
Limited system pallet to only send_governance_call
yrong Nov 25, 2024
40c2e19
Merge branch 'outbound-queue-v2' into outbound-queue-v2-with-transact
yrong Nov 25, 2024
178f50a
Remove agent_id from converter
yrong Nov 26, 2024
bab6b63
Merge branch 'snowbridge-v2' into outbound-queue-v2
yrong Nov 26, 2024
2426e3d
Merge branch 'outbound-queue-v2' into outbound-queue-v2-with-transact
yrong Nov 26, 2024
3f28e6e
Merge branch 'snowbridge-v2' into outbound-queue-v2
yrong Nov 28, 2024
282a883
Merge branch 'outbound-queue-v2' into outbound-queue-v2-with-transact
yrong Nov 28, 2024
aba918d
Fix breaking tests
yrong Nov 28, 2024
a7ced85
Clean up
yrong Nov 28, 2024
5696fdf
Seperate outbound router crates
yrong Nov 28, 2024
7ca9c1b
Merge pull request #8 from yrong/outbound-router-crates
yrong Nov 29, 2024
b6fa9a2
Merge pull request #7 from yrong/outbound-queue-v2-with-transact
yrong Nov 29, 2024
e97e235
Clean up
yrong Nov 29, 2024
992740b
Rename test
yrong Nov 29, 2024
0c8badf
Reorgnize code layout
yrong Nov 29, 2024
8869608
Merge branch 'snowbridge-v2' into outbound-queue-v2
yrong Nov 29, 2024
10dcaf5
More cleanup
yrong Nov 29, 2024
8dfa3c5
Add force_create_agent
yrong Dec 4, 2024
f540b52
Smoke test for multiple-hop
yrong Dec 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 117 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ members = [
"bridges/snowbridge/pallets/inbound-queue",
"bridges/snowbridge/pallets/inbound-queue/fixtures",
"bridges/snowbridge/pallets/outbound-queue",
"bridges/snowbridge/pallets/outbound-queue/merkle-tree",
"bridges/snowbridge/pallets/outbound-queue-v2",
"bridges/snowbridge/pallets/outbound-queue-v2/runtime-api",
"bridges/snowbridge/pallets/outbound-queue/runtime-api",
"bridges/snowbridge/pallets/system",
"bridges/snowbridge/pallets/system/runtime-api",
"bridges/snowbridge/primitives/beacon",
"bridges/snowbridge/primitives/core",
"bridges/snowbridge/primitives/ethereum",
"bridges/snowbridge/primitives/merkle-tree",
"bridges/snowbridge/primitives/outbound",
"bridges/snowbridge/primitives/outbound-router",
"bridges/snowbridge/primitives/router",
"bridges/snowbridge/runtime/runtime-common",
"bridges/snowbridge/runtime/test-common",
Expand Down Expand Up @@ -1222,13 +1226,18 @@ smoldot-light = { version = "0.9.0", default-features = false }
snowbridge-beacon-primitives = { path = "bridges/snowbridge/primitives/beacon", default-features = false }
snowbridge-core = { path = "bridges/snowbridge/primitives/core", default-features = false }
snowbridge-ethereum = { path = "bridges/snowbridge/primitives/ethereum", default-features = false }
snowbridge-outbound-queue-merkle-tree = { path = "bridges/snowbridge/pallets/outbound-queue/merkle-tree", default-features = false }
snowbridge-merkle-tree = { path = "bridges/snowbridge/primitives/merkle-tree", default-features = false }
snowbridge-outbound-primitives = { path = "bridges/snowbridge/primitives/outbound", default-features = false }
snowbridge-outbound-queue-runtime-api = { path = "bridges/snowbridge/pallets/outbound-queue/runtime-api", default-features = false }
snowbridge-outbound-queue-runtime-api-v2 = { path = "bridges/snowbridge/pallets/outbound-queue-v2/runtime-api", default-features = false }
snowbridge-outbound-router-primitives = { path = "bridges/snowbridge/primitives/outbound-router", default-features = false }
snowbridge-pallet-ethereum-client = { path = "bridges/snowbridge/pallets/ethereum-client", default-features = false }
snowbridge-pallet-ethereum-client-fixtures = { path = "bridges/snowbridge/pallets/ethereum-client/fixtures", default-features = false }
snowbridge-pallet-inbound-queue = { path = "bridges/snowbridge/pallets/inbound-queue", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { path = "bridges/snowbridge/pallets/inbound-queue/fixtures", default-features = false }
snowbridge-pallet-inbound-queue-fixtures-v2 = { path = "bridges/snowbridge/pallets/inbound-queue-v2/fixtures", default-features = false }
snowbridge-pallet-outbound-queue = { path = "bridges/snowbridge/pallets/outbound-queue", default-features = false }
snowbridge-pallet-outbound-queue-v2 = { path = "bridges/snowbridge/pallets/outbound-queue-v2", default-features = false }
snowbridge-pallet-system = { path = "bridges/snowbridge/pallets/system", default-features = false }
snowbridge-router-primitives = { path = "bridges/snowbridge/primitives/router", default-features = false }
snowbridge-runtime-common = { path = "bridges/snowbridge/runtime/runtime-common", default-features = false }
Expand Down
93 changes: 93 additions & 0 deletions bridges/snowbridge/pallets/outbound-queue-v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[package]
name = "snowbridge-pallet-outbound-queue-v2"
description = "Snowbridge Outbound Queue Pallet V2"
version = "0.2.0"
authors = ["Snowfork <[email protected]>"]
edition.workspace = true
repository.workspace = true
license = "Apache-2.0"
categories = ["cryptography::cryptocurrencies"]

[lints]
workspace = true

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
serde = { features = ["alloc", "derive"], workspace = true }
codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
alloy-primitives = { features = ["rlp"], workspace = true }
alloy-sol-types = { workspace = true }

frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
sp-runtime = { workspace = true }
sp-io = { workspace = true }
sp-arithmetic = { workspace = true }

bridge-hub-common = { workspace = true }

snowbridge-core = { workspace = true }
ethabi = { workspace = true }
hex-literal = { workspace = true, default-features = true }
snowbridge-merkle-tree = { workspace = true }
snowbridge-outbound-router-primitives = { workspace = true }
snowbridge-outbound-primitives = { workspace = true }
xcm = { workspace = true }
xcm-executor = { workspace = true }
xcm-builder = { workspace = true }

[dev-dependencies]
pallet-message-queue = { workspace = true }
sp-keyring = { workspace = true, default-features = true }

[features]
default = ["std"]
std = [
"alloy-primitives/std",
"alloy-sol-types/std",
"bridge-hub-common/std",
"codec/std",
"ethabi/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"pallet-message-queue/std",
"scale-info/std",
"serde/std",
"snowbridge-core/std",
"snowbridge-merkle-tree/std",
"snowbridge-outbound-primitives/std",
"snowbridge-outbound-router-primitives/std",
"sp-arithmetic/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm-builder/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"bridge-hub-common/runtime-benchmarks",
"frame-benchmarking",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-message-queue/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-message-queue/try-runtime",
"sp-runtime/try-runtime",
]
3 changes: 3 additions & 0 deletions bridges/snowbridge/pallets/outbound-queue-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ethereum Outbound Queue

Sends messages from an origin in the Polkadot ecosystem to Ethereum.
Loading