sim:set-balance
Set the ETH balance of an account in a fork simulation.
Syntax
Section titled “Syntax”sim:set-balance <address> <amount>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
address |
address |
Contract or account address |
amount |
number |
New balance in wei |
Examples
Section titled “Examples”# Fund the connected wallet with 100 ETHsim:fork --using anvil ( sim:set-balance @me 100e18)- Can only be used inside a
sim:forkblock - The amount is in wei (use
e18for ETH)
See Also
Section titled “See Also”- fork — create a simulation fork
- set-code — set contract bytecode
- set-storage-at — set storage slots