Skip to content

Commit

Permalink
eth receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
girazoki committed Oct 3, 2024
1 parent 7428085 commit 64fa082
Show file tree
Hide file tree
Showing 5 changed files with 246 additions and 1 deletion.
177 changes: 177 additions & 0 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ westend-runtime = { git = "https://github.com/moondance-labs/polkadot-sdk", bran
westend-runtime-constants = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407", default-features = false }
xcm-runtime-apis = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407", default-features = false }


# Bridges (wasm)
snowbridge-pallet-ethereum-client = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407", default-features = false }
snowbridge-beacon-primitives = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407", default-features = false }

# Polkadot (client)
polkadot-cli = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407" }
polkadot-node-subsystem = { git = "https://github.com/moondance-labs/polkadot-sdk", branch = "tanssi-polkadot-stable2407" }
Expand Down
7 changes: 7 additions & 0 deletions solo-chains/runtime/dancelight/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ tanssi-runtime-common = { workspace = true }
# Moonkit
pallet-migrations = { workspace = true }

# Bridges
snowbridge-pallet-ethereum-client = { workspace = true }
snowbridge-beacon-primitives = { workspace = true }

[dev-dependencies]
keyring = { workspace = true }
remote-externalities = { workspace = true }
Expand Down Expand Up @@ -241,6 +245,8 @@ std = [
"serde/std",
"serde_derive",
"serde_json/std",
"snowbridge-pallet-ethereum-client/std",
"snowbridge-beacon-primitives/std",
"sp-api/std",
"sp-arithmetic/std",
"sp-consensus-aura/std",
Expand Down Expand Up @@ -323,6 +329,7 @@ runtime-benchmarks = [
"primitives/runtime-benchmarks",
"runtime-common/runtime-benchmarks",
"runtime-parachains/runtime-benchmarks",
"snowbridge-pallet-ethereum-client/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-staking/runtime-benchmarks",
"tanssi-runtime-common/runtime-benchmarks",
Expand Down
53 changes: 53 additions & 0 deletions solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

// Copyright (C) Moondance Labs Ltd.
// This file is part of Tanssi.

// Tanssi is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Tanssi is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Tanssi. If not, see <http://www.gnu.org/licenses/>

//! The bridge to ethereum config

pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32;
use crate::{parameter_types, Runtime, RuntimeEvent, ConstU32};
use snowbridge_beacon_primitives::{Fork, ForkVersions};

parameter_types! {
pub const ChainForkVersions: ForkVersions = ForkVersions {
genesis: Fork {
version: [144, 0, 0, 111], // 0x90000069
epoch: 0,
},
altair: Fork {
version: [144, 0, 0, 112], // 0x90000070
epoch: 50,
},
bellatrix: Fork {
version: [144, 0, 0, 113], // 0x90000071
epoch: 100,
},
capella: Fork {
version: [144, 0, 0, 114], // 0x90000072
epoch: 56832,
},
deneb: Fork {
version: [144, 0, 0, 115], // 0x90000073
epoch: 132608,
},
};
}

impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type WeightInfo = ();
}
5 changes: 4 additions & 1 deletion solo-chains/runtime/dancelight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ use dancelight_runtime_constants::{currency::*, fee::*, time::*};
// XCM configurations.
pub mod xcm_config;

pub mod bridge_to_ethereum_config;

// Weights
mod weights;

Expand Down Expand Up @@ -1572,9 +1574,10 @@ construct_runtime! {
// BEEFY Bridges support.
Beefy: pallet_beefy = 240,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue polkadot-fellows/runtimes#160 for details.
// refer to block<N>.
Mmr: pallet_mmr = 241,
MmrLeaf: pallet_beefy_mmr = 242,
EthereumBeaconClient: snowbridge_pallet_ethereum_client = 243,

ParasSudoWrapper: paras_sudo_wrapper = 250,

Expand Down

0 comments on commit 64fa082

Please sign in to comment.