mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 08:41:02 +00:00
1b1fab0da3
## Summary Asset bridging support for AssetHub**Rococo** <-> AssetHub**Wococo** was added [here](https://github.com/paritytech/polkadot-sdk/pull/1215), so now we aim to bridge AssetHub**Rococo** and AssetHub**Westend**. (And perhaps retire AssetHubWococo and the Wococo chains). ## Solution **bridge-hub-westend-runtime** - added new runtime as a copy of `bridge-hub-rococo-runtime` - added support for bridging to `BridgeHubRococo` - added tests and benchmarks **bridge-hub-rococo-runtime** - added support for bridging to `BridgeHubWestend` - added tests and benchmarks - internal refactoring by splitting bridge configuration per network, e.g., `bridge_to_whatevernetwork_config.rs`. **asset-hub-rococo-runtime** - added support for asset bridging to `AssetHubWestend` (allows to receive only WNDs) - added new xcm router for `Westend` - added tests and benchmarks **asset-hub-westend-runtime** - added support for asset bridging to `AssetHubRococo` (allows to receive only ROCs) - added new xcm router for `Rococo` - added tests and benchmarks ## Deployment All changes will be deployed as a part of https://github.com/paritytech/polkadot-sdk/issues/1988. ## TODO - [x] benchmarks for all pallet instances - [x] integration tests - [x] local run scripts Relates to: https://github.com/paritytech/parity-bridges-common/issues/2602 Relates to: https://github.com/paritytech/polkadot-sdk/issues/1988 --------- Co-authored-by: command-bot <> Co-authored-by: Adrian Catangiu <adrian@parity.io> Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
51 lines
1.9 KiB
Rust
51 lines
1.9 KiB
Rust
// Copyright (C) Parity Technologies (UK) Ltd.
|
|
// This file is part of Cumulus.
|
|
|
|
// Cumulus is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
|
|
// Cumulus is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
//! Bridge definitions that can be used by multiple BridgeHub flavors.
|
|
//! All configurations here should be dedicated to a single chain; in other words, we don't need two
|
|
//! chains for a single pallet configuration.
|
|
//!
|
|
//! For example, the messaging pallet needs to know the sending and receiving chains, but the
|
|
//! GRANDPA tracking pallet only needs to be aware of one chain.
|
|
|
|
use super::{weights, AccountId, Balance, Balances, BlockNumber, Runtime, RuntimeEvent};
|
|
use frame_support::parameter_types;
|
|
|
|
parameter_types! {
|
|
pub storage RequiredStakeForStakeAndSlash: Balance = 1_000_000;
|
|
pub const RelayerStakeLease: u32 = 8;
|
|
pub const RelayerStakeReserveId: [u8; 8] = *b"brdgrlrs";
|
|
|
|
pub storage DeliveryRewardInBalance: u64 = 1_000_000;
|
|
}
|
|
|
|
/// Allows collect and claim rewards for relayers
|
|
impl pallet_bridge_relayers::Config for Runtime {
|
|
type RuntimeEvent = RuntimeEvent;
|
|
type Reward = Balance;
|
|
type PaymentProcedure =
|
|
bp_relayers::PayRewardFromAccount<pallet_balances::Pallet<Runtime>, AccountId>;
|
|
type StakeAndSlash = pallet_bridge_relayers::StakeAndSlashNamed<
|
|
AccountId,
|
|
BlockNumber,
|
|
Balances,
|
|
RelayerStakeReserveId,
|
|
RequiredStakeForStakeAndSlash,
|
|
RelayerStakeLease,
|
|
>;
|
|
type WeightInfo = weights::pallet_bridge_relayers::WeightInfo<Runtime>;
|
|
}
|