Function ink_env::test::set_account_balance
source · pub fn set_account_balance<T>(account_id: T::AccountId, new_balance: T::Balance)where
T: Environment<Balance = u128>,
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.