mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
[testnet] BridgeHubRococo nits (#1972)
This PR does not introduce any functional changes to the existing code, it merely addresses several minor refactors: - Moving bridging pallets to separate files. - Improving the readability and naming of weight files for bridging pallets and bridging pallet instances. The reason for this refactor is to facilitate easier plugin integration for the upcoming bridge between Rococo and Westend. --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -838,7 +838,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToWococoXcmRouterInstance> for Runtime
|
||||
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_wococo::WococoNetwork;
|
||||
type Bridges = xcm_config::bridging::to_wococo::NetworkExportTable;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
@@ -869,7 +869,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToRococoXcmRouterInstance> for Runtime
|
||||
|
||||
type UniversalLocation = xcm_config::UniversalLocation;
|
||||
type BridgedNetworkId = xcm_config::bridging::to_rococo::RococoNetwork;
|
||||
type Bridges = xcm_config::bridging::to_rococo::NetworkExportTable;
|
||||
type Bridges = xcm_config::bridging::NetworkExportTable;
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
type BridgeHubOrigin = EnsureXcm<Equals<xcm_config::bridging::SiblingBridgeHub>>;
|
||||
|
||||
@@ -763,8 +763,16 @@ pub mod bridging {
|
||||
pub XcmBridgeHubRouterFeeAssetId: AssetId = TokenLocation::get().into();
|
||||
/// Price per byte - can be adjusted via governance `set_storage` call.
|
||||
pub storage XcmBridgeHubRouterByteFee: Balance = TransactionByteFee::get();
|
||||
|
||||
pub BridgeTable: sp_std::vec::Vec<NetworkExportTableItem> =
|
||||
sp_std::vec::Vec::new().into_iter()
|
||||
.chain(to_wococo::BridgeTable::get())
|
||||
.chain(to_rococo::BridgeTable::get())
|
||||
.collect();
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
pub mod to_wococo {
|
||||
use super::*;
|
||||
|
||||
@@ -773,7 +781,7 @@ pub mod bridging {
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -824,8 +832,6 @@ pub mod bridging {
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Trusted reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
@@ -864,7 +870,7 @@ pub mod bridging {
|
||||
1,
|
||||
X2(
|
||||
Parachain(SiblingBridgeHubParaId::get()),
|
||||
PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX)
|
||||
PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -915,8 +921,6 @@ pub mod bridging {
|
||||
}
|
||||
}
|
||||
|
||||
pub type NetworkExportTable = xcm_builder::NetworkExportTable<BridgeTable>;
|
||||
|
||||
/// Reserve locations filter for `xcm_executor::Config::IsReserve`.
|
||||
/// Locations from which the runtime accepts reserved assets.
|
||||
pub type IsTrustedBridgedReserveLocationForConcreteAsset =
|
||||
|
||||
@@ -704,7 +704,7 @@ mod asset_hub_rococo_tests {
|
||||
(MultiLocation { parents: 2, interior: X1(GlobalConsensus(Wococo)) }, 1000000000000, 1_000_000_000),
|
||||
bridging_to_asset_hub_wococo,
|
||||
(
|
||||
X1(PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_WOCOCO_MESSAGES_PALLET_INDEX)),
|
||||
X1(PalletInstance(bp_bridge_hub_rococo::WITH_BRIDGE_ROCOCO_TO_WOCOCO_MESSAGES_PALLET_INDEX)),
|
||||
GlobalConsensus(Wococo),
|
||||
X1(Parachain(1000))
|
||||
)
|
||||
@@ -909,7 +909,7 @@ mod asset_hub_wococo_tests {
|
||||
(MultiLocation { parents: 2, interior: X1(GlobalConsensus(Rococo)) }, 1000000000000, 1_000_000_000),
|
||||
with_wococo_flavor_bridging_to_asset_hub_rococo,
|
||||
(
|
||||
X1(PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_ROCOCO_MESSAGES_PALLET_INDEX)),
|
||||
X1(PalletInstance(bp_bridge_hub_wococo::WITH_BRIDGE_WOCOCO_TO_ROCOCO_MESSAGES_PALLET_INDEX)),
|
||||
GlobalConsensus(Rococo),
|
||||
X1(Parachain(1000))
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user