diff --git a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/tests/snowbridge.rs index ea78df2f81d7..4e80b92d8b05 100644 --- a/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/tests/snowbridge.rs +++ b/cumulus/parachains/integration-tests/emulated/bridges/bridge-hub-rococo/src/tests/snowbridge.rs @@ -12,7 +12,6 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. - use crate::*; use hex_literal::hex; use integration_tests_common::{AssetHubRococoPallet, BridgeHubRococoPallet}; @@ -25,6 +24,8 @@ const CHAIN_ID: u64 = 15; const DEST_PARA_ID: u32 = 1000; const SNOWBRIDGE_SOVEREIGN: [u8; 32] = hex!("da4d66c3651dc151264eee5460493210338e41a7bbfca91a520e438daf180bf5"); +const TREASURY_ACCOUNT: [u8; 32] = + hex!("6d6f646c70792f74727372790000000000000000000000000000000000000000"); const WETH: [u8; 20] = hex!("87d1f7fdfEe7f651FaBc8bFCB6E086C278b77A7d"); const ASSETHUB_SOVEREIGN: [u8; 32] = hex!("7369626ce8030000000000000000000000000000000000000000000000000000"); @@ -390,7 +391,7 @@ fn reserve_transfer_token() { events.iter().find(|&event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Deposit{ who, amount }) - if *who == SNOWBRIDGE_SOVEREIGN.into() && *amount == 16903333 + if *who == TREASURY_ACCOUNT.into() && *amount == 16903333 )) .is_some(), "Snowbridge sovereign takes local fee." 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 9399f0ea833e..073e44558744 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 @@ -86,7 +86,7 @@ use pallet_xcm::EnsureXcm; pub use sp_consensus_aura::sr25519::AuthorityId as AuraId; pub use sp_runtime::{MultiAddress, Perbill, Permill}; use xcm::VersionedMultiLocation; -use xcm_config::{SnowbridgeTreasuryAccount, XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{TreasuryAccount, XcmConfig, XcmOriginToTransactDispatchOrigin}; use bp_runtime::HeaderId; @@ -618,7 +618,7 @@ impl snowbridge_control::Config for Runtime { type MessageHasher = BlakeTwo256; type SiblingOrigin = EnsureXcm; type AgentIdOf = xcm_config::AgentIdOf; - type TreasuryAccount = SnowbridgeTreasuryAccount; + type TreasuryAccount = TreasuryAccount; type Token = Balances; type WeightInfo = weights::snowbridge_control::WeightInfo; #[cfg(feature = "runtime-benchmarks")] diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs index c6fd1282803f..a201c5da019d 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/xcm_config.rs @@ -51,13 +51,10 @@ use polkadot_parachain_primitives::primitives::Sibling; use polkadot_runtime_common::xcm_sender::ExponentialPrice; use rococo_runtime_constants::system_parachain::SystemParachains; use snowbridge_core::{ - outbound::SendMessageFee, + outbound::SendMessageFeeProvider, sibling_sovereign_account_raw }; -use snowbridge_router_primitives::{ - inbound::GlobalConsensusEthereumConvertsFor, - outbound::EthereumBlobExporter, -}; +use snowbridge_router_primitives:: outbound::EthereumBlobExporter; use sp_core::{Get, H256}; use sp_runtime::traits::AccountIdConversion; use sp_std::marker::PhantomData; @@ -91,7 +88,6 @@ parameter_types! { // Network and location for the local Ethereum testnet. pub const EthereumChainId: u64 = 15; pub const EthereumNetwork: NetworkId = NetworkId::Ethereum { chain_id: EthereumChainId::get() }; - pub SnowbridgeTreasuryAccount: AccountId = GlobalConsensusEthereumConvertsFor::::from_chain_id(&EthereumChainId::get()).into(); } /// Adapter for resolving `NetworkId` based on `pub storage Flavor: RuntimeFlavor`. @@ -329,7 +325,7 @@ impl xcm_executor::Config for XcmConfig { XcmExportFeeToSnowbridge< TokenLocation, EthereumNetwork, - SnowbridgeTreasuryAccount, + TreasuryAccount, Self::AssetTransactor, crate::EthereumOutboundQueue, >, @@ -612,7 +608,7 @@ impl< EthereumNetwork: Get, ReceiverAccount: Get, AssetTransactor: TransactAsset, - OutboundQueue: SendMessageFee, + OutboundQueue: SendMessageFeeProvider, > HandleFee for XcmExportFeeToSnowbridge< TokenLocation,