mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Vesting pallet - make WithdrawReasons configurable (#12109)
* Vesting pallet - make WithdrawReasons configurable * Update `pallet-vesting` README Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -34,7 +34,7 @@ use frame_support::{
|
||||
traits::{
|
||||
AsEnsureOriginWithArg, ConstU128, ConstU16, ConstU32, Currency, EitherOfDiverse,
|
||||
EqualPrivilegeOnly, Everything, Imbalance, InstanceFilter, KeyOwnerProofSystem,
|
||||
LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote,
|
||||
LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote, WithdrawReasons,
|
||||
},
|
||||
weights::{
|
||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||
@@ -1374,6 +1374,8 @@ impl pallet_society::Config for Runtime {
|
||||
|
||||
parameter_types! {
|
||||
pub const MinVestedTransfer: Balance = 100 * DOLLARS;
|
||||
pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons =
|
||||
WithdrawReasons::except(WithdrawReasons::TRANSFER | WithdrawReasons::RESERVE);
|
||||
}
|
||||
|
||||
impl pallet_vesting::Config for Runtime {
|
||||
@@ -1382,6 +1384,7 @@ impl pallet_vesting::Config for Runtime {
|
||||
type BlockNumberToBalance = ConvertInto;
|
||||
type MinVestedTransfer = MinVestedTransfer;
|
||||
type WeightInfo = pallet_vesting::weights::SubstrateWeight<Runtime>;
|
||||
type UnvestedFundsAllowedWithdrawReasons = UnvestedFundsAllowedWithdrawReasons;
|
||||
// `VestingInfo` encode length is 36bytes. 28 schedules gets encoded as 1009 bytes, which is the
|
||||
// highest number of schedules that encodes less than 2^10.
|
||||
const MAX_VESTING_SCHEDULES: u32 = 28;
|
||||
|
||||
Reference in New Issue
Block a user