Trait pallet_vesting::pallet::Config

source ·
pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type Currency: LockableCurrency<Self::AccountId>;
    type BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
    type MinVestedTransfer: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
    type WeightInfo: WeightInfo;
    type UnvestedFundsAllowedWithdrawReasons: Get<WithdrawReasons>;
    type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>;

    const MAX_VESTING_SCHEDULES: u32;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

The overarching event type.

source

type Currency: LockableCurrency<Self::AccountId>

The currency trait.

source

type BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

Convert the block number into a balance.

source

type MinVestedTransfer: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

The minimum amount transferred to call vested_transfer.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type UnvestedFundsAllowedWithdrawReasons: Get<WithdrawReasons>

Reasons that determine under which conditions the balance may drop below the unvested amount.

source

type BlockNumberProvider: BlockNumberProvider<BlockNumber = BlockNumberFor<Self>>

Provider for the block number.

Required Associated Constants§

source

const MAX_VESTING_SCHEDULES: u32

Maximum number of vesting schedules an account may have at a given moment.

Object Safety§

This trait is not object safe.

Implementors§