diff --git a/pallets/connectors/Cargo.toml b/pallets/connectors/Cargo.toml index 14f264d6ba..f2a8f397c6 100644 --- a/pallets/connectors/Cargo.toml +++ b/pallets/connectors/Cargo.toml @@ -18,6 +18,9 @@ frame-support = { git = "https://github.com/paritytech/substrate", default-featu frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" } sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" } +# Substrate crates +sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.24" } + # Optional dependencies for benchmarking frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true , branch = "polkadot-v0.9.24" } pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false , optional = true, branch = "polkadot-v0.9.24" } diff --git a/pallets/connectors/src/lib.rs b/pallets/connectors/src/lib.rs index 513a3018e9..304e2bc807 100644 --- a/pallets/connectors/src/lib.rs +++ b/pallets/connectors/src/lib.rs @@ -30,6 +30,7 @@ pub mod pallet { use crate::weights::WeightInfo; use frame_support::pallet_prelude::*; use frame_system::pallet_prelude::*; + use sp_core::TypeId; #[pallet::pallet] #[pallet::generate_store(pub (super) trait Store)] @@ -97,6 +98,15 @@ pub mod pallet { Gnosis, } + #[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)] + pub struct DomainLocator { + pub domain: Domain, + } + + impl TypeId for DomainLocator { + const TYPE_ID: [u8; 4] = *b"domn"; + } + #[derive(Encode, Decode, Default, Clone, PartialEq, TypeInfo)] #[cfg_attr(feature = "std", derive(Debug))] pub struct DomainAddress(pub [u8; 32]); @@ -129,10 +139,10 @@ pub mod pallet { #[pallet::weight(::WeightInfo::add_pool())] pub fn add_pool( origin: OriginFor, - pool_id: T::PoolId, - domain: Domain, + _pool_id: T::PoolId, + _domain: Domain, ) -> DispatchResult { - let who = ensure_signed(origin.clone())?; + let _who = ensure_signed(origin.clone())?; //TODO(nuno) diff --git a/pallets/connectors/src/message.rs b/pallets/connectors/src/message.rs index b9f7063f86..49b6617016 100644 --- a/pallets/connectors/src/message.rs +++ b/pallets/connectors/src/message.rs @@ -11,7 +11,7 @@ impl Encode for Message { fn encode(&self) -> Vec { match self { Message::Invalid => vec![0u8], - Message::AddPool { pool_id } => { + Message::AddPool { pool_id: _ } => { let mut message: Vec = vec![0u8]; message.append(&mut vec![1, 2, 3]); //todo(nuno): &mut pool_id.as_bytes().to_vec()); message