ink_env::test

Function set_account_balance

source
pub fn set_account_balance(addr: H160, new_balance: U256)
Expand description

Sets the balance of the account to the given balance.

§Note

Note that account could refer to either a user account or a smart contract account.

If a 0 balance is set, this would not fail. This is useful for reaping an account.

§Errors

  • If account does not exist.
  • If the underlying account type does not match.
  • If the underlying new_balance type does not match.
  • If the new_balance is less than the existential minimum.