From deba13c845c9fc0c5b9ebb04479e70b3ab17f663 Mon Sep 17 00:00:00 2001 From: Parth Desai Date: Thu, 21 Nov 2024 13:02:33 +0400 Subject: [PATCH] move symbiotic_message_processor to primitives --- Cargo.lock | 1 + primitives/bridge/Cargo.toml | 3 +++ primitives/bridge/src/lib.rs | 2 ++ .../bridge}/src/symbiotic_message_processor.rs | 0 .../runtime/dancelight/src/bridge_to_ethereum_config.rs | 4 ++-- solo-chains/runtime/dancelight/src/lib.rs | 1 - 6 files changed, 8 insertions(+), 3 deletions(-) rename {solo-chains/runtime/dancelight => primitives/bridge}/src/symbiotic_message_processor.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index e6429e1cf..034ab3e75 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18746,6 +18746,7 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "macro_rules_attribute", + "pallet-external-validators", "parity-scale-codec", "scale-info", "serde", diff --git a/primitives/bridge/Cargo.toml b/primitives/bridge/Cargo.toml index 3786ab144..51b201022 100644 --- a/primitives/bridge/Cargo.toml +++ b/primitives/bridge/Cargo.toml @@ -17,6 +17,7 @@ frame-support = { workspace = true } frame-system = { workspace = true } impl-trait-for-tuples = { workspace = true } macro_rules_attribute = { workspace = true } +pallet-external-validators = { workspace = true } parity-scale-codec = { workspace = true } scale-info = { workspace = true } serde = { workspace = true } @@ -40,6 +41,7 @@ std = [ "ethabi/std", "frame-support/std", "frame-system/std", + "pallet-external-validators/std", "parity-scale-codec/std", "scale-info/std", "serde/std", @@ -55,6 +57,7 @@ runtime-benchmarks = [ "cumulus-primitives-core/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", + "pallet-external-validators/runtime-benchmarks", "snowbridge-core/runtime-benchmarks", "snowbridge-pallet-outbound-queue/runtime-benchmarks", "snowbridge-router-primitives/runtime-benchmarks", diff --git a/primitives/bridge/src/lib.rs b/primitives/bridge/src/lib.rs index 2ef83d726..d4b8fdbfb 100644 --- a/primitives/bridge/src/lib.rs +++ b/primitives/bridge/src/lib.rs @@ -19,6 +19,8 @@ #![cfg_attr(not(feature = "std"), no_std)] +pub mod symbiotic_message_processor; + use { core::marker::PhantomData, cumulus_primitives_core::{ diff --git a/solo-chains/runtime/dancelight/src/symbiotic_message_processor.rs b/primitives/bridge/src/symbiotic_message_processor.rs similarity index 100% rename from solo-chains/runtime/dancelight/src/symbiotic_message_processor.rs rename to primitives/bridge/src/symbiotic_message_processor.rs diff --git a/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs b/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs index aa071204e..4de9e6b33 100644 --- a/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs +++ b/solo-chains/runtime/dancelight/src/bridge_to_ethereum_config.rs @@ -17,13 +17,13 @@ //! The bridge to ethereum config pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32; -#[cfg(not(feature = "runtime-benchmarks"))] -use crate::symbiotic_message_processor::SymbioticMessageProcessor; #[cfg(not(test))] use crate::EthereumBeaconClient; use frame_support::weights::ConstantMultiplier; use sp_core::H160; use sp_core::{ConstU32, ConstU8}; +#[cfg(not(feature = "runtime-benchmarks"))] +use tp_bridge::symbiotic_message_processor::SymbioticMessageProcessor; use { crate::{ parameter_types, weights, xcm_config, AggregateMessageOrigin, Balance, Balances, diff --git a/solo-chains/runtime/dancelight/src/lib.rs b/solo-chains/runtime/dancelight/src/lib.rs index e68ff6ed9..011e92576 100644 --- a/solo-chains/runtime/dancelight/src/lib.rs +++ b/solo-chains/runtime/dancelight/src/lib.rs @@ -148,7 +148,6 @@ use dancelight_runtime_constants::{currency::*, fee::*, time::*}; pub mod xcm_config; pub mod bridge_to_ethereum_config; -pub mod symbiotic_message_processor; // Weights mod weights;