Trait dock_token_migration::pallet::Config
source · 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§
sourcetype Event: From<Event<Self>> + IsType<<Self as Config>::Event> + Into<<Self as Config>::Event>
type Event: From<Event<Self>> + IsType<<Self as Config>::Event> + Into<<Self as Config>::Event>
The overarching event type.
sourcetype BlockNumberToBalance: Convert<Self::BlockNumber, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type BlockNumberToBalance: Convert<Self::BlockNumber, <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Convert the block number into a balance.
sourcetype VestingMilestones: Get<u8>
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.
sourcetype VestingDuration: Get<u32>
type VestingDuration: Get<u32>
Vesting duration in number of blocks.