mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
companion for new pools reward scheme (#5757)
* companion for new pools reward scheme
* fix build
* fix
* Fux
* update lockfile for {"substrate"}
* fmt
Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+306
-421
File diff suppressed because it is too large
Load Diff
@@ -253,6 +253,7 @@ try-runtime = [
|
|||||||
"pallet-indices/try-runtime",
|
"pallet-indices/try-runtime",
|
||||||
"pallet-membership/try-runtime",
|
"pallet-membership/try-runtime",
|
||||||
"pallet-multisig/try-runtime",
|
"pallet-multisig/try-runtime",
|
||||||
|
"pallet-nomination-pools/try-runtime",
|
||||||
"pallet-offences/try-runtime",
|
"pallet-offences/try-runtime",
|
||||||
"pallet-preimage/try-runtime",
|
"pallet-preimage/try-runtime",
|
||||||
"pallet-proxy/try-runtime",
|
"pallet-proxy/try-runtime",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ use sp_runtime::{
|
|||||||
OpaqueKeys, SaturatedConversion, Verify,
|
OpaqueKeys, SaturatedConversion, Verify,
|
||||||
},
|
},
|
||||||
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
|
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
|
||||||
ApplyExtrinsicResult, KeyTypeId, Perbill, Percent, Permill,
|
ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill, Percent, Permill,
|
||||||
};
|
};
|
||||||
use sp_staking::SessionIndex;
|
use sp_staking::SessionIndex;
|
||||||
#[cfg(any(feature = "std", test))]
|
#[cfg(any(feature = "std", test))]
|
||||||
@@ -1439,13 +1439,15 @@ impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
||||||
pub const MinPointsToBalance: u32 = 10;
|
pub const MaxPointsToBalance: u8 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_nomination_pools::Config for Runtime {
|
impl pallet_nomination_pools::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
|
type CurrencyBalance = Balance;
|
||||||
|
type RewardCounter = FixedU128;
|
||||||
type BalanceToU256 = BalanceToU256;
|
type BalanceToU256 = BalanceToU256;
|
||||||
type U256ToBalance = U256ToBalance;
|
type U256ToBalance = U256ToBalance;
|
||||||
type StakingInterface = Staking;
|
type StakingInterface = Staking;
|
||||||
@@ -1454,7 +1456,7 @@ impl pallet_nomination_pools::Config for Runtime {
|
|||||||
// we use the same number of allowed unlocking chunks as with staking.
|
// we use the same number of allowed unlocking chunks as with staking.
|
||||||
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
|
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
|
||||||
type PalletId = PoolsPalletId;
|
type PalletId = PoolsPalletId;
|
||||||
type MinPointsToBalance = MinPointsToBalance;
|
type MaxPointsToBalance = MaxPointsToBalance;
|
||||||
}
|
}
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
@@ -1600,7 +1602,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(),
|
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in the transactions.
|
/// The payload being signed in the transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
|
|||||||
@@ -237,6 +237,7 @@ try-runtime = [
|
|||||||
"pallet-indices/try-runtime",
|
"pallet-indices/try-runtime",
|
||||||
"pallet-membership/try-runtime",
|
"pallet-membership/try-runtime",
|
||||||
"pallet-multisig/try-runtime",
|
"pallet-multisig/try-runtime",
|
||||||
|
"pallet-nomination-pools/try-runtime",
|
||||||
"pallet-offences/try-runtime",
|
"pallet-offences/try-runtime",
|
||||||
"pallet-preimage/try-runtime",
|
"pallet-preimage/try-runtime",
|
||||||
"pallet-proxy/try-runtime",
|
"pallet-proxy/try-runtime",
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ use sp_runtime::{
|
|||||||
OpaqueKeys, SaturatedConversion, Verify,
|
OpaqueKeys, SaturatedConversion, Verify,
|
||||||
},
|
},
|
||||||
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
|
transaction_validity::{TransactionPriority, TransactionSource, TransactionValidity},
|
||||||
ApplyExtrinsicResult, KeyTypeId, Perbill,
|
ApplyExtrinsicResult, FixedU128, KeyTypeId, Perbill,
|
||||||
};
|
};
|
||||||
use sp_staking::SessionIndex;
|
use sp_staking::SessionIndex;
|
||||||
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
use sp_std::{collections::btree_map::BTreeMap, prelude::*};
|
||||||
@@ -1030,13 +1030,15 @@ impl sp_runtime::traits::Convert<sp_core::U256, Balance> for U256ToBalance {
|
|||||||
|
|
||||||
parameter_types! {
|
parameter_types! {
|
||||||
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
pub const PoolsPalletId: PalletId = PalletId(*b"py/nopls");
|
||||||
pub const MinPointsToBalance: u32 = 10;
|
pub const MaxPointsToBalance: u8 = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl pallet_nomination_pools::Config for Runtime {
|
impl pallet_nomination_pools::Config for Runtime {
|
||||||
type Event = Event;
|
type Event = Event;
|
||||||
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
type WeightInfo = weights::pallet_nomination_pools::WeightInfo<Self>;
|
||||||
type Currency = Balances;
|
type Currency = Balances;
|
||||||
|
type CurrencyBalance = Balance;
|
||||||
|
type RewardCounter = FixedU128;
|
||||||
type BalanceToU256 = BalanceToU256;
|
type BalanceToU256 = BalanceToU256;
|
||||||
type U256ToBalance = U256ToBalance;
|
type U256ToBalance = U256ToBalance;
|
||||||
type StakingInterface = Staking;
|
type StakingInterface = Staking;
|
||||||
@@ -1045,7 +1047,7 @@ impl pallet_nomination_pools::Config for Runtime {
|
|||||||
// we use the same number of allowed unlocking chunks as with staking.
|
// we use the same number of allowed unlocking chunks as with staking.
|
||||||
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
|
type MaxUnbonding = <Self as pallet_staking::Config>::MaxUnlockingChunks;
|
||||||
type PalletId = PoolsPalletId;
|
type PalletId = PoolsPalletId;
|
||||||
type MinPointsToBalance = MinPointsToBalance;
|
type MaxPointsToBalance = MaxPointsToBalance;
|
||||||
}
|
}
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
@@ -1171,7 +1173,7 @@ pub type Executive = frame_executive::Executive<
|
|||||||
frame_system::ChainContext<Runtime>,
|
frame_system::ChainContext<Runtime>,
|
||||||
Runtime,
|
Runtime,
|
||||||
AllPalletsWithSystem,
|
AllPalletsWithSystem,
|
||||||
(),
|
pallet_nomination_pools::migration::v2::MigrateToV2<Runtime>,
|
||||||
>;
|
>;
|
||||||
/// The payload being signed in transactions.
|
/// The payload being signed in transactions.
|
||||||
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
pub type SignedPayload = generic::SignedPayload<Call, SignedExtra>;
|
||||||
|
|||||||
Reference in New Issue
Block a user