pub trait Replenishable {
    type Balance: Balance;

    // Required methods
    fn replenish_by_amount(
        msa_id: u64,
        amount: Self::Balance
    ) -> Result<(), DispatchError>;
    fn replenish_all_for(msa_id: u64) -> Result<(), DispatchError>;
    fn can_replenish(msa_id: u64) -> bool;
}
Expand description

A trait for replenishing Capacity.

Required Associated Types§

type Balance: Balance

Scalar type for representing balance of an account.

Required Methods§

fn replenish_by_amount( msa_id: u64, amount: Self::Balance ) -> Result<(), DispatchError>

Replenish an MSA’s Capacity by an amount.

fn replenish_all_for(msa_id: u64) -> Result<(), DispatchError>

Replenish all Capacity balance for an MSA.

fn can_replenish(msa_id: u64) -> bool

Checks if an account can be replenished.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Config> Replenishable for Pallet<T>

§

type Balance = <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance