Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Guantong committed Jan 10, 2023
1 parent bc8d5ec commit ac6464c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion runtime/crab/src/pallets/vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub UnvestedFundsAllowedWithdrawReasons: frame_support::traits::WithdrawReasons =
frame_support::traits::WithdrawReasons::except(frame_support::traits::WithdrawReasons::TRANSFER | frame_support::traits::WithdrawReasons::RESERVE);
}

impl pallet_vesting::Config for Runtime {
type BlockNumberToBalance = sp_runtime::traits::ConvertInto;
type Currency = Balances;
type MinVestedTransfer = ConstU128<UNIT>;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();

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;
Expand Down
7 changes: 6 additions & 1 deletion runtime/darwinia/src/pallets/vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub UnvestedFundsAllowedWithdrawReasons: frame_support::traits::WithdrawReasons =
frame_support::traits::WithdrawReasons::except(frame_support::traits::WithdrawReasons::TRANSFER | frame_support::traits::WithdrawReasons::RESERVE);
}

impl pallet_vesting::Config for Runtime {
type BlockNumberToBalance = sp_runtime::traits::ConvertInto;
type Currency = Balances;
type MinVestedTransfer = ConstU128<UNIT>;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();

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;
Expand Down
7 changes: 6 additions & 1 deletion runtime/pangolin/src/pallets/vesting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,18 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub UnvestedFundsAllowedWithdrawReasons: frame_support::traits::WithdrawReasons =
frame_support::traits::WithdrawReasons::except(frame_support::traits::WithdrawReasons::TRANSFER | frame_support::traits::WithdrawReasons::RESERVE);
}

impl pallet_vesting::Config for Runtime {
type BlockNumberToBalance = sp_runtime::traits::ConvertInto;
type Currency = Balances;
type MinVestedTransfer = ConstU128<UNIT>;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();

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;
Expand Down

0 comments on commit ac6464c

Please sign in to comment.