BalanceAPI

Trait BalanceAPI 

Source
pub trait BalanceAPI<T>
where T: Sandbox, <T as Sandbox>::Runtime: Config,
{ // Required methods fn mint_into( &mut self, address: &<<T as Sandbox>::Runtime as Config>::AccountId, amount: <<T as Sandbox>::Runtime as Config>::Balance, ) -> Result<<<T as Sandbox>::Runtime as Config>::Balance, DispatchError>; fn free_balance( &mut self, address: &<<T as Sandbox>::Runtime as Config>::AccountId, ) -> <<T as Sandbox>::Runtime as Config>::Balance; }
Expand description

Balance API for the sandbox.

Required Methods§

Source

fn mint_into( &mut self, address: &<<T as Sandbox>::Runtime as Config>::AccountId, amount: <<T as Sandbox>::Runtime as Config>::Balance, ) -> Result<<<T as Sandbox>::Runtime as Config>::Balance, DispatchError>

Mint tokens to an account.

§Arguments
  • address - The address of the account to add tokens to.
  • amount - The number of tokens to add.
Source

fn free_balance( &mut self, address: &<<T as Sandbox>::Runtime as Config>::AccountId, ) -> <<T as Sandbox>::Runtime as Config>::Balance

Return the free balance of an account.

§Arguments
  • address - The address of the account to query.

Implementors§

Source§

impl<T> BalanceAPI<T> for T
where T: Sandbox, <T as Sandbox>::Runtime: Config,