Skip to content

Commit

Permalink
Initialize bridge V2
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Oct 8, 2024
1 parent 9128dca commit d8895c2
Show file tree
Hide file tree
Showing 46 changed files with 6,131 additions and 2 deletions.
112 changes: 112 additions & 0 deletions Cargo.lock

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

12 changes: 12 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ members = [
"bridges/snowbridge/pallets/ethereum-client",
"bridges/snowbridge/pallets/ethereum-client/fixtures",
"bridges/snowbridge/pallets/inbound-queue",
"bridges/snowbridge/pallets/inbound-queue-v2",
"bridges/snowbridge/pallets/inbound-queue-v2/fixtures",
"bridges/snowbridge/pallets/inbound-queue/fixtures",
"bridges/snowbridge/pallets/outbound-queue",
"bridges/snowbridge/pallets/outbound-queue-v2",
"bridges/snowbridge/pallets/outbound-queue-v2/merkle-tree",
"bridges/snowbridge/pallets/outbound-queue-v2/runtime-api",
"bridges/snowbridge/pallets/outbound-queue/merkle-tree",
"bridges/snowbridge/pallets/outbound-queue/runtime-api",
"bridges/snowbridge/pallets/system",
Expand All @@ -59,6 +64,7 @@ members = [
"bridges/snowbridge/primitives/core",
"bridges/snowbridge/primitives/ethereum",
"bridges/snowbridge/primitives/router",
"bridges/snowbridge/primitives/router-v2",
"bridges/snowbridge/runtime/runtime-common",
"bridges/snowbridge/runtime/test-common",
"cumulus/bin/pov-validator",
Expand Down Expand Up @@ -1202,14 +1208,20 @@ snowbridge-beacon-primitives = { path = "bridges/snowbridge/primitives/beacon",
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-outbound-queue-merkle-tree-v2 = { path = "bridges/snowbridge/pallets/outbound-queue-v2/merkle-tree", 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-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-inbound-queue-v2 = { path = "bridges/snowbridge/pallets/inbound-queue-v2", 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-router-primitives-v2 = { path = "bridges/snowbridge/primitives/router-v2", default-features = false }
snowbridge-runtime-common = { path = "bridges/snowbridge/runtime/runtime-common", default-features = false }
snowbridge-runtime-test-common = { path = "bridges/snowbridge/runtime/test-common", default-features = false }
snowbridge-system-runtime-api = { path = "bridges/snowbridge/pallets/system/runtime-api", default-features = false }
Expand Down
93 changes: 93 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[package]
name = "snowbridge-pallet-inbound-queue-v2"
description = "Snowbridge Inbound 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 = { optional = true, workspace = true, default-features = true }
codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
hex-literal = { optional = true, workspace = true, default-features = true }
log = { 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 }
pallet-balances = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }

xcm = { workspace = true }
xcm-executor = { workspace = true }

snowbridge-core = { workspace = true }
snowbridge-router-primitives-v2 = { workspace = true }
snowbridge-beacon-primitives = { workspace = true }
snowbridge-pallet-inbound-queue-fixtures-v2 = { optional = true, workspace = true }

[dev-dependencies]
frame-benchmarking = { workspace = true, default-features = true }
sp-keyring = { workspace = true, default-features = true }
snowbridge-pallet-ethereum-client = { workspace = true, default-features = true }
hex-literal = { workspace = true, default-features = true }

[features]
default = ["std"]
std = [
"alloy-primitives/std",
"alloy-sol-types/std",
"codec/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-balances/std",
"scale-info/std",
"serde",
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"snowbridge-pallet-inbound-queue-fixtures-v2?/std",
"snowbridge-router-primitives-v2/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"xcm-executor/std",
"xcm/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"hex-literal",
"pallet-balances/runtime-benchmarks",
"snowbridge-core/runtime-benchmarks",
"snowbridge-pallet-ethereum-client/runtime-benchmarks",
"snowbridge-pallet-inbound-queue-fixtures-v2/runtime-benchmarks",
"snowbridge-router-primitives-v2/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-executor/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"pallet-balances/try-runtime",
"snowbridge-pallet-ethereum-client/try-runtime",
"sp-runtime/try-runtime",
]
3 changes: 3 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ethereum Inbound Queue

Reads messages from Ethereum and sends it to intended destination on Polkadot, using XCM.
34 changes: 34 additions & 0 deletions bridges/snowbridge/pallets/inbound-queue-v2/fixtures/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[package]
name = "snowbridge-pallet-inbound-queue-fixtures-v2"
description = "Snowbridge Inbound Queue Test Fixtures V2"
version = "0.10.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]
hex-literal = { workspace = true, default-features = true }
sp-core = { workspace = true }
sp-std = { workspace = true }
snowbridge-core = { workspace = true }
snowbridge-beacon-primitives = { workspace = true }

[features]
default = ["std"]
std = [
"snowbridge-beacon-primitives/std",
"snowbridge-core/std",
"sp-core/std",
"sp-std/std",
]
runtime-benchmarks = [
"snowbridge-core/runtime-benchmarks",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2023 Snowfork <[email protected]>
#![cfg_attr(not(feature = "std"), no_std)]

pub mod register_token;
pub mod send_token;
pub mod send_token_to_penpal;
Loading

0 comments on commit d8895c2

Please sign in to comment.