Skip to content

sim:set-balance

Set the ETH balance of an account in a fork simulation.

Smart blocks: cannot be nested. This command performs an immediate wallet, RPC, external-service or control-flow operation and cannot run inside an atomic batch.

sim:set-balance <address> <amount>
NameTypeEvaluationDescription
addressaddressBuild timeContract or account address
amountnumberBuild timeNew balance in wei
# Fund the connected wallet with 100 ETH
sim:fork --using anvil (
sim:set-balance @me 100e18
)
  • Can only be used inside a sim:fork block
  • The amount is in wei (use e18 for ETH)