pub trait EscrowableCurrency<AccountId> {
    type Moment;
    type Currency: Currency<AccountId>;
    fn escrow_account() -> AccountId;
fn set_lock(
        id: LockIdentifier,
        who: &AccountId,
        amount: <Self::Currency as Currency<AccountId>>::Balance,
        until: Self::Moment,
        reason: Reason
    ) -> Result<(), TotemLocksError>;
fn remove_lock(
        id: LockIdentifier,
        who: &AccountId
    ) -> Result<(), TotemLocksError>; }
Expand description

A currency whose accounts can have liquidity restrictions.

Associated Types

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

The maximum number of locks a user should have on their account.

Required methods

This function simply returns the Totem escrow account address.

Create a new balance lock on account who.

If the new lock is valid (i.e. not already expired), it will push the struct to the Locks vec in storage.

Remove an existing lock.

Implementors