pub trait Config: Config {
    type Event: From<Event<Self>> + IsType<<Self as Config>::Event> + Into<<Self as Config>::Event>;
    type Currency: ReservableCurrency<Self::AccountId>;
    type BlockNumberToBalance: Convert<Self::BlockNumber, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
    type VestingMilestones: Get<u8>;
    type VestingDuration: Get<u32>;
    type MaxSwapBonuses: Get<u32>;
    type MaxVestingBonuses: Get<u32>;
}
Expand description

The pallet’s configuration trait.

Required Associated Types§

source

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

The overarching event type.

source

type Currency: ReservableCurrency<Self::AccountId>

Currency type that supports locking

source

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

Convert the block number into a balance.

source

type VestingMilestones: Get<u8>

NOTE: Both VestingMilestones and VestingDuration must be > 0. The ideal situation would be to have a compile time assertion in this pallet but since the static assertions pallet does not work with generics (https://github.com/nvzqz/static-assertions-rs/issues/21), the check has been moved to the runtime instantiation. If this pallet is used outside this project, corresponding checks should be done. Vesting happens in milestones. The total duration is sub-divided into equal duration milestones and for each milestone, proportional balance is vested. This might be moved to a storage item if needs to be configurable but is less likely.

source

type VestingDuration: Get<u32>

Vesting duration in number of blocks.

source

type MaxSwapBonuses: Get<u32>

source

type MaxVestingBonuses: Get<u32>

Implementors§