From 44cd54e7e70a9178ffbc40903fc31705c87726cb Mon Sep 17 00:00:00 2001 From: claravanstaden Date: Thu, 31 Oct 2024 10:12:56 +0200 Subject: [PATCH] fmt --- .../snowbridge/pallets/inbound-queue-v2/src/mock.rs | 2 +- .../pallets/outbound-queue-v2/src/mock.rs | 2 +- .../bridge-hub-westend/src/tests/snowbridge_v2.rs | 13 +++++++------ .../bridge-hub-westend/src/bridge_common_config.rs | 7 ++----- .../src/bridge_to_ethereum_config.rs | 7 +++---- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/bridges/snowbridge/pallets/inbound-queue-v2/src/mock.rs b/bridges/snowbridge/pallets/inbound-queue-v2/src/mock.rs index 0f6fc34efdb1..20b884ccc57b 100644 --- a/bridges/snowbridge/pallets/inbound-queue-v2/src/mock.rs +++ b/bridges/snowbridge/pallets/inbound-queue-v2/src/mock.rs @@ -13,7 +13,7 @@ use snowbridge_core::{ inbound::{Log, Proof, VerificationError}, TokenId, }; -use sp_core::{ConstU128, H160, ConstU8}; +use sp_core::{ConstU128, ConstU8, H160}; use sp_runtime::{ traits::{IdentifyAccount, IdentityLookup, MaybeEquivalence, Verify}, BuildStorage, MultiSignature, diff --git a/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs b/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs index 566600caf3f9..bcffaf5173d9 100644 --- a/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs +++ b/bridges/snowbridge/pallets/outbound-queue-v2/src/mock.rs @@ -21,7 +21,7 @@ use snowbridge_core::{ pricing::{PricingParameters, Rewards}, ParaId, }; -use sp_core::{ConstU128, ConstU8, ConstU32, H160, H256}; +use sp_core::{ConstU128, ConstU32, ConstU8, H160, H256}; use sp_runtime::{ traits::{BlakeTwo256, IdentityLookup, Keccak256}, AccountId32, BuildStorage, FixedU128, diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge_v2.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge_v2.rs index 423c764620a1..503485c49b9f 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge_v2.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/snowbridge_v2.rs @@ -16,8 +16,8 @@ use crate::imports::*; use bridge_hub_westend_runtime::EthereumInboundQueue; use hex_literal::hex; use snowbridge_core::rewards::RewardLedger; -use snowbridge_router_primitives::inbound::{ - v1::{Command, Destination, MessageV1, VersionedMessage}, +use snowbridge_router_primitives::inbound::v1::{ + Command, Destination, MessageV1, VersionedMessage, }; use testnet_parachains_constants::westend::snowbridge::EthereumNetwork; @@ -202,11 +202,12 @@ fn claim_rewards_works() { ] ); - let relayer_location = Location::new(1, [Parachain(1000), Junction::AccountId32{ id: reward_address.into(), network: None}]); - let result = BridgeRelayers::claim( - RuntimeOrigin::signed(relayer.clone()), - relayer_location.clone(), + let relayer_location = Location::new( + 1, + [Parachain(1000), Junction::AccountId32 { id: reward_address.into(), network: None }], ); + let result = + BridgeRelayers::claim(RuntimeOrigin::signed(relayer.clone()), relayer_location.clone()); assert_ok!(result); let events = BridgeHubWestend::events(); diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_common_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_common_config.rs index ae026be7ba92..3782acbe42f4 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_common_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_common_config.rs @@ -22,15 +22,12 @@ //! GRANDPA tracking pallet only needs to be aware of one chain. use super::{weights, AccountId, Balance, Balances, BlockNumber, Runtime, RuntimeEvent}; +use crate::{xcm_config, XcmRouter}; use bp_messages::LegacyLaneId; use frame_support::parameter_types; use sp_core::H160; +use sp_runtime::traits::{ConstU128, ConstU32, ConstU8}; use testnet_parachains_constants::westend::snowbridge::EthereumNetwork; -use crate::XcmRouter; -use crate::xcm_config; -use sp_runtime::traits::ConstU32; -use sp_runtime::traits::ConstU128; -use sp_runtime::traits::ConstU8; parameter_types! { pub storage RequiredStakeForStakeAndSlash: Balance = 1_000_000; diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_ethereum_config.rs index 0b6bd0c85764..cf9384c62a84 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/bridge_to_ethereum_config.rs @@ -16,12 +16,11 @@ #[cfg(not(feature = "runtime-benchmarks"))] use crate::XcmRouter; -use crate::BridgeRelayers; use crate::{ xcm_config, xcm_config::{TreasuryAccount, UniversalLocation}, - Balances, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, MessageQueue, Runtime, - RuntimeEvent, TransactionByteFee, + Balances, BridgeRelayers, EthereumInboundQueue, EthereumOutboundQueue, EthereumSystem, + MessageQueue, Runtime, RuntimeEvent, TransactionByteFee, }; use parachains_common::{AccountId, Balance}; use snowbridge_beacon_primitives::{Fork, ForkVersions}; @@ -31,12 +30,12 @@ use snowbridge_router_primitives::{ outbound::{v1::EthereumBlobExporter, v2::EthereumBlobExporter as EthereumBlobExporterV2}, }; use sp_core::H160; +use sp_runtime::traits::ConstU8; use testnet_parachains_constants::westend::{ currency::*, fee::WeightToFee, snowbridge::{EthereumLocation, EthereumNetwork, INBOUND_QUEUE_PALLET_INDEX}, }; -use sp_runtime::traits::ConstU8; use crate::xcm_config::RelayNetwork; #[cfg(feature = "runtime-benchmarks")]