Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[asset-hubs/bridge-hubs] Bridging Polkadot Asset Hub <-> Kusama Asset Hub to enable asset transfer of KSMs/DOTs #1352

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4617ffa
asset-hubs: transfer assets via bridge using pallet-xcm
acatangiu Aug 28, 2023
a517420
Transfer reserve asset with dynamic fees and back-pressure.
bkontur Sep 3, 2023
945ea7f
Kusama/Polkadot BridgeHub allows bridging between Kusama/Polkadot (re…
bkontur Sep 4, 2023
4af6519
Extended Kusama/Polkadot BridgeHub with dynamic fees and congestion s…
bkontur Sep 4, 2023
867321c
Update review comments from Adrian
bkontur Sep 5, 2023
11e0931
Merge branch 'master' into bko-bridging-kusama-polkadot-assets
bkontur Sep 7, 2023
a3d1264
Fixed local run for AssetHubKusama/AssetHubPolkadot asset transfer (K…
bkontur Sep 11, 2023
0aeb13a
Merge remote-tracking branch 'origin/master' into bko-bridging-kusama…
bkontur Sep 19, 2023
c20f3e4
Zombienet nits
bkontur Sep 19, 2023
80964f9
Merge remote-tracking branch 'origin/master' into bko-bridging-kusama…
bkontur Sep 19, 2023
6fe8678
Merge remote-tracking branch 'origin/master' into bko-bridging-kusama…
bkontur Sep 19, 2023
b2015dc
Fix benchmarks
bkontur Sep 19, 2023
1fd7aaa
Fix benchmarks
bkontur Sep 19, 2023
791d6dd
Backporting nits from https://github.com/paritytech/polkadot-sdk/pull…
bkontur Sep 21, 2023
2cd5e55
Merge remote-tracking branch 'origin/master' into bko-bridging-kusama…
bkontur Sep 21, 2023
344e0b0
ParaIds as constants to primitives
bkontur Sep 21, 2023
d42e481
Fix
bkontur Sep 21, 2023
76ca00b
Fix
bkontur Sep 21, 2023
03511e0
ensure_configuration -> prepare_configuration
bkontur Sep 22, 2023
fc9727c
Constants nit
bkontur Sep 22, 2023
534c718
Deps
bkontur Sep 22, 2023
58d6319
Cargo.lock
bkontur Sep 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Constants nit
  • Loading branch information
bkontur committed Sep 22, 2023
commit fc9727c43f4dede62a8b159666ed855b26f73e67
3 changes: 3 additions & 0 deletions bridges/primitives/chain-bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@ pub const WITH_BRIDGE_HUB_KUSAMA_MESSAGES_PALLET_NAME: &str = "BridgeKusamaMessa
/// chains.
pub const WITH_BRIDGE_HUB_KUSAMA_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";

/// Pallet index of `BridgePolkadotMessages: pallet_bridge_messages::<Instance1>`.
pub const WITH_BRIDGE_POLKADOT_MESSAGES_PALLET_INDEX: u8 = 53;

decl_bridge_finality_runtime_apis!(bridge_hub_kusama);
decl_bridge_messages_runtime_apis!(bridge_hub_kusama);
3 changes: 3 additions & 0 deletions bridges/primitives/chain-bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,8 @@ pub const WITH_BRIDGE_HUB_POLKADOT_MESSAGES_PALLET_NAME: &str = "BridgePolkadotM
/// chains.
pub const WITH_BRIDGE_HUB_POLKADOT_RELAYERS_PALLET_NAME: &str = "BridgeRelayers";

/// Pallet index of `BridgeKusamaMessages: pallet_bridge_messages::<Instance1>`.
pub const WITH_BRIDGE_KUSAMA_MESSAGES_PALLET_INDEX: u8 = 53;

decl_bridge_finality_runtime_apis!(bridge_hub_polkadot);
decl_bridge_messages_runtime_apis!(bridge_hub_polkadot);
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,13 @@ pub mod bridging {
parameter_types! {
pub BridgeHubKusamaParaId: u32 = 1002;
pub BridgeHubKusama: MultiLocation = MultiLocation::new(1, X1(Parachain(BridgeHubKusamaParaId::get())));
pub BridgeHubKusamaWithBridgeHubPolkadotInstance: MultiLocation = MultiLocation::new(1, X2(Parachain(BridgeHubKusamaParaId::get()), PalletInstance(53)));
pub BridgeHubKusamaWithBridgeHubPolkadotInstance: MultiLocation = MultiLocation::new(
1,
X2(
Parachain(BridgeHubKusamaParaId::get()),
PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_POLKADOT_MESSAGES_PALLET_INDEX)
)
);
pub const PolkadotNetwork: NetworkId = NetworkId::Polkadot;
pub AssetHubPolkadot: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(PolkadotNetwork::get()), Parachain(bp_asset_hub_polkadot::ASSET_HUB_POLKADOT_PARACHAIN_ID)));
pub DotLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(PolkadotNetwork::get())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,13 @@ pub mod bridging {
parameter_types! {
pub BridgeHubPolkadotParaId: u32 = 1002;
pub BridgeHubPolkadot: MultiLocation = MultiLocation::new(1, X1(Parachain(BridgeHubPolkadotParaId::get())));
pub BridgeHubPolkadotWithBridgeHubKusamaInstance: MultiLocation = MultiLocation::new(1, X2(Parachain(BridgeHubPolkadotParaId::get()), PalletInstance(53)));
pub BridgeHubPolkadotWithBridgeHubKusamaInstance: MultiLocation = MultiLocation::new(
1,
X2(
Parachain(BridgeHubPolkadotParaId::get()),
PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_KUSAMA_MESSAGES_PALLET_INDEX)
)
);
pub const KusamaNetwork: NetworkId = NetworkId::Kusama;
pub AssetHubKusama: MultiLocation = MultiLocation::new(2, X2(GlobalConsensus(KusamaNetwork::get()), Parachain(bp_asset_hub_kusama::ASSET_HUB_KUSAMA_PARACHAIN_ID)));
pub KsmLocation: MultiLocation = MultiLocation::new(2, X1(GlobalConsensus(KusamaNetwork::get())));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,10 @@ mod tests {
WithBridgeHubPolkadotMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);

assert_eq!(
BridgePolkadotMessagesPalletInstance::get(),
X1(PalletInstance(bp_bridge_hub_kusama::WITH_BRIDGE_POLKADOT_MESSAGES_PALLET_INDEX))
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -259,5 +259,10 @@ mod tests {
WithBridgeHubKusamaMessagesInstance,
PriorityBoostPerMessage,
>(FEE_BOOST_PER_MESSAGE);

assert_eq!(
BridgeKusamaMessagesPalletInstance::get(),
X1(PalletInstance(bp_bridge_hub_polkadot::WITH_BRIDGE_KUSAMA_MESSAGES_PALLET_INDEX))
);
}
}