[][src]Trait frame_support::traits::VestingCurrency

pub trait VestingCurrency<AccountId>: Currency<AccountId> {
    type Moment;
    fn vesting_balance(who: &AccountId) -> Self::Balance;
fn add_vesting_schedule(
        who: &AccountId,
        locked: Self::Balance,
        per_block: Self::Balance,
        starting_block: Self::Moment
    ) -> DispatchResult;
fn remove_vesting_schedule(who: &AccountId); }

A currency whose accounts can have balances which vest over time.

Associated Types

type Moment

The quantity used to denote time; usually just a BlockNumber.

Loading content...

Required methods

fn vesting_balance(who: &AccountId) -> Self::Balance

Get the amount that is currently being vested and cannot be transferred out of this account.

fn add_vesting_schedule(
    who: &AccountId,
    locked: Self::Balance,
    per_block: Self::Balance,
    starting_block: Self::Moment
) -> DispatchResult

Adds a vesting schedule to a given account.

If there already exists a vesting schedule for the given account, an Err is returned and nothing is updated.

fn remove_vesting_schedule(who: &AccountId)

Remove a vesting schedule for a given account.

Loading content...

Implementors

Loading content...