pub trait PoolReserve<AccountId, CurrencyId>: PoolInspect<AccountId, CurrencyId> {
    type Balance;

    // Required methods
    fn withdraw(
        pool_id: Self::PoolId,
        to: AccountId,
        amount: Self::Balance
    ) -> DispatchResult;
    fn deposit(
        pool_id: Self::PoolId,
        from: AccountId,
        amount: Self::Balance
    ) -> DispatchResult;
}
Expand description

A trait that support pool reserve operations such as withdraw and deposit

Required Associated Types§

Required Methods§

source

fn withdraw( pool_id: Self::PoolId, to: AccountId, amount: Self::Balance ) -> DispatchResult

Withdraw amount from the reserve to the to account.

source

fn deposit( pool_id: Self::PoolId, from: AccountId, amount: Self::Balance ) -> DispatchResult

Deposit amount from the from account into the reserve.

Object Safety§

This trait is not object safe.

Implementors§