From 9feea846bae186d7da395f791f207d043ef435eb Mon Sep 17 00:00:00 2001 From: Ron Date: Wed, 18 Oct 2023 10:13:06 +0800 Subject: [PATCH] oak-issue-30 (#66) * Upgrade for Control pallet * Update dependency * Allow utility call through xcm * Add SovereignAccountOf * More refactor * Add FeeProvider config * Allow xcm to config base_fee * Remove unused * Move config to outbound queue * Update dependency * Make RegisterCallIndex runtime const * Use Treasury account to collect fees * Remove unused const * Add configs * Clean dependencies * Update dependencies * Add estimate rpc * Add runtime api * runtime api for compute_fee_reward * Use TreasuryAccount more specific * Cleanup * Update rococo runtime * update * Update weights * Fix for smoke test * Update rococo runtime * Update for inbound MessageConverter * update benchmarking logic in cumulus * Chore * Some polish --------- Co-authored-by: Vincent Geddes --- Cargo.lock | 1 + parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 280726f057e..9f529db966f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13460,6 +13460,7 @@ dependencies = [ "sp-runtime", "sp-std", "xcm", + "xcm-builder", ] [[package]] diff --git a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 9bd5f3c0eb7..eb06422fe17 100644 --- a/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -77,8 +77,10 @@ use xcm_config::{ XcmOriginToTransactDispatchOrigin, }; +use crate::xcm_config::RelayLocation; use bp_parachains::SingleParaStoredHeaderDataBuilder; use bp_runtime::HeaderId; +use snowbridge_router_primitives::inbound::MessageToXcm; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -586,6 +588,7 @@ impl pallet_bridge_relayers::Config for Runtime { parameter_types! { pub const Reward: u128 = 10; pub const GatewayAddress: H160 = H160(EthereumGatewayAddress::get()); + pub const CreateAssetCall: [u8;2] = [53, 0]; } #[cfg(feature = "runtime-benchmarks")] @@ -608,6 +611,7 @@ impl snowbridge_inbound_queue::Config for Runtime { type GatewayAddress = GatewayAddress; #[cfg(feature = "runtime-benchmarks")] type Helper = Runtime; + type MessageConverter = MessageToXcm; } @@ -1124,7 +1128,6 @@ impl_runtime_apis! { impl cumulus_pallet_session_benchmarking::Config for Runtime {} use xcm::latest::prelude::*; - use xcm_config::RelayLocation; impl pallet_xcm_benchmarks::Config for Runtime { type XcmConfig = xcm_config::XcmConfig;