mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
Add nomination pools to Polkadot runtime (#5582)
* Add nomination poools to Polkadot runtime * fmt + spellcheck * cargo run --quiet --profile=production --features runtime-benchmarks -- benchmark pallet --chain=polkadot-dev --steps=50 --repeat=20 --pallet=pallet_nomination_pools --extrinsic=* --execution=wasm --wasm-execution=compiled --header=./file_header.txt --output=./runtime/polkadot/src/weights/ * fiux * ".git/.scripts/bench-bot.sh" runtime polkadot-dev pallet_nomination_pools * ".git/.scripts/fmt.sh" 1 * Update runtime/polkadot/src/lib.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fix * fmt * Update runtime/polkadot/src/lib.rs Co-authored-by: Parity Bot <admin@parity.io> Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -31,7 +31,8 @@ use primitives::v2::{
|
||||
};
|
||||
use runtime_common::{
|
||||
auctions, claims, crowdloan, impl_runtime_weights, impls::DealWithFees, paras_registrar,
|
||||
prod_or_fast, slots, BlockHashCount, BlockLength, CurrencyToVote, SlowAdjustingFeeUpdate,
|
||||
prod_or_fast, slots, BalanceToU256, BlockHashCount, BlockLength, CurrencyToVote,
|
||||
SlowAdjustingFeeUpdate, U256ToBalance,
|
||||
};
|
||||
use sp_std::{cmp::Ordering, collections::btree_map::BTreeMap, prelude::*};
|
||||
|
||||
@@ -1196,7 +1197,8 @@ impl InstanceFilter<Call> for ProxyType {
|
||||
Call::Crowdloan(..) |
|
||||
Call::Slots(..) |
|
||||
Call::Auctions(..) | // Specifically omitting the entire XCM Pallet
|
||||
Call::VoterList(..)
|
||||
Call::VoterList(..) |
|
||||
Call::NominationPools(..)
|
||||
),
|
||||
ProxyType::Governance => matches!(
|
||||
c,
|
||||
@@ -1423,20 +1425,6 @@ impl pallet_gilt::Config for Runtime {
|
||||
type WeightInfo = weights::pallet_gilt::WeightInfo<Runtime>;
|
||||
}
|
||||
|
||||
pub struct BalanceToU256;
|
||||
impl sp_runtime::traits::Convert<Balance, sp_core::U256> for BalanceToU256 {
|
||||
fn convert(n: Balance) -> sp_core::U256 {
|
||||
n.into()
|
||||
}
|
||||
}
|
||||
pub struct U256ToBalance;
|
||||
impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
||||
fn convert(n: sp_core::U256) -> Balance {
|
||||
use frame_support::traits::Defensive;
|
||||
n.try_into().defensive_unwrap_or(Balance::MAX)
|
||||
}
|
||||
}
|
||||
|
||||
parameter_types! {
|
||||
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
||||
pub const MaxPointsToBalance: u8 = 10;
|
||||
|
||||
Reference in New Issue
Block a user