ink_env::test

Function get_account_balance

source
pub fn get_account_balance<T>(addr: H160) -> Result<U256>
Expand description

Returns the balance of the account.

§Note

Note that account could refer to either a user account or a smart contract account. This returns the same as env::api::balance if given the account id of the currently executed smart contract.

§Errors

  • If account does not exist.
  • If the underlying account type does not match.