Trait frame_support::traits::tokens::fungible::Inspect [−][src]
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) -> DepositConsequence; fn can_withdraw(
who: &AccountId,
amount: Self::Balance
) -> WithdrawConsequence<Self::Balance>; }
Expand description
Trait for providing balance-inspection access to a fungible asset.
Associated Types
Required methods
fn total_issuance() -> Self::Balance
fn total_issuance() -> Self::Balance
The total amount of issuance in the system.
fn minimum_balance() -> Self::Balance
fn minimum_balance() -> Self::Balance
The minimum balance any single account may have.
fn reducible_balance(who: &AccountId, keep_alive: bool) -> Self::Balance
fn reducible_balance(who: &AccountId, keep_alive: bool) -> Self::Balance
Get the maximum amount that who
can withdraw/transfer successfully.
fn can_deposit(who: &AccountId, amount: Self::Balance) -> DepositConsequence
fn can_deposit(who: &AccountId, amount: Self::Balance) -> DepositConsequence
Returns true
if the balance of who
may be increased by amount
.
fn can_withdraw(
who: &AccountId,
amount: Self::Balance
) -> WithdrawConsequence<Self::Balance>
fn can_withdraw(
who: &AccountId,
amount: Self::Balance
) -> WithdrawConsequence<Self::Balance>
Returns Failed
if the balance of who
may not be decreased by amount
, otherwise
the consequence.