From 7566c01e46480fc91096590a91df6b43c0bb56a5 Mon Sep 17 00:00:00 2001 From: ron Date: Tue, 3 Sep 2024 08:20:22 +0800 Subject: [PATCH] Fix building error --- bridges/snowbridge/pallets/system/src/lib.rs | 7 +++---- bridges/snowbridge/primitives/core/src/lib.rs | 2 +- .../bridge-hub-rococo/src/bridge_to_ethereum_config.rs | 2 ++ .../runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 4 ---- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/bridges/snowbridge/pallets/system/src/lib.rs b/bridges/snowbridge/pallets/system/src/lib.rs index 46a94782666c..0814a0e35f0c 100644 --- a/bridges/snowbridge/pallets/system/src/lib.rs +++ b/bridges/snowbridge/pallets/system/src/lib.rs @@ -38,11 +38,10 @@ //! //! ## Polkadot-native tokens on Ethereum //! -//! Tokens deposited on AssetHub pallet can be bridged to Ethereum as wrapped ERC20 tokens. As a prerequisite, -//! the token should be registered first. +//! Tokens deposited on AssetHub pallet can be bridged to Ethereum as wrapped ERC20 tokens. As a +//! prerequisite, the token should be registered first. //! //! * [`Call:register_token`]: Register a token location as a wrapped ERC20 contract on Ethereum. -//! #![cfg_attr(not(feature = "std"), no_std)] #[cfg(test)] mod mock; @@ -762,7 +761,7 @@ pub mod pallet { impl MaybeEquivalence for Pallet { fn convert(foreign_id: &TokenId) -> Option { - ForeignToNativeId::::get(id) + ForeignToNativeId::::get(foreign_id) } fn convert_back(location: &Location) -> Option { NativeToForeignId::::get(location) diff --git a/bridges/snowbridge/primitives/core/src/lib.rs b/bridges/snowbridge/primitives/core/src/lib.rs index 0afba79fd765..f2e4f9131b50 100644 --- a/bridges/snowbridge/primitives/core/src/lib.rs +++ b/bridges/snowbridge/primitives/core/src/lib.rs @@ -168,7 +168,7 @@ impl DescribeLocation for DescribeHere { pub type AgentIdOf = HashedDescription)>; -#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo)] +#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo)] pub struct AssetMetadata { pub name: BoundedVec>, pub symbol: BoundedVec>, diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs index 4e585c99b89e..26857d262c20 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs @@ -166,6 +166,8 @@ parameter_types! { }; } +pub const SLOTS_PER_EPOCH: u32 = snowbridge_pallet_ethereum_client::config::SLOTS_PER_EPOCH as u32; + impl snowbridge_pallet_ethereum_client::Config for Runtime { type RuntimeEvent = RuntimeEvent; type ForkVersions = ChainForkVersions; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index b28113e76b3d..14409ce4642d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -42,10 +42,6 @@ use bridge_runtime_common::extensions::{ CheckAndBoostBridgeGrandpaTransactions, CheckAndBoostBridgeParachainsTransactions, }; use cumulus_pallet_parachain_system::RelayNumberMonotonicallyIncreases; -use snowbridge_core::{ - outbound::{Command, Fee}, - AgentId, PricingParameters, -}; use sp_api::impl_runtime_apis; use sp_core::{crypto::KeyTypeId, OpaqueMetadata}; use sp_runtime::{