pub trait Inspect<AccountId> {
    type Balance: Balance;

    fn total_issuance() -> Self::Balance;
    fn minimum_balance() -> Self::Balance;
    fn balance(who: &AccountId) -> Self::Balance;
    fn reducible_balance(who: &AccountId, keep_alive: bool) -> Self::Balance;
    fn can_deposit(
        who: &AccountId,
        amount: Self::Balance,
        mint: bool
    ) -> DepositConsequence; fn can_withdraw(
        who: &AccountId,
        amount: Self::Balance
    ) -> WithdrawConsequence<Self::Balance>; }
Expand description

Trait for providing balance-inspection access to a fungible asset.

Required Associated Types§

Scalar type for representing balance of an account.

Required Methods§

The total amount of issuance in the system.

The minimum balance any single account may have.

Get the balance of who.

Get the maximum amount that who can withdraw/transfer successfully.

Returns true if the balance of who may be increased by amount.

  • who: The account of which the balance should be increased by amount.
  • amount: How much should the balance be increased?
  • mint: Will amount be minted to deposit it into account?

Returns Failed if the balance of who may not be decreased by amount, otherwise the consequence.

Implementors§