Skip to Content
CLISet ERC20 Balances

Set ERC20 Balances

Change an address’s ERC20 token balance on your Stagenet from the command line.

Targets your active stagenet — see Target a Stagenet. Backed by the balance RPC methods.

erc20-balance add

Add amount of <token> to <holder>.

contract.dev erc20-balance add 0x1111... \ 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 \ 1000000 # +1 USDC (6 decimals)
ArgumentDescription
<holder>The account whose balance to update
<token>The ERC20 token contract address
<amount>Amount in the token’s smallest unit (decimal or 0x-hex)

Sample output:

Added ERC20 balance for 0x1111111111111111111111111111111111111111 on 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 (+1000000) new balance: 5000000

Amounts are shown as raw integers in the token’s smallest unit — the CLI doesn’t fetch each token’s decimals() for display.

erc20-balance set

Overwrite a holder’s ERC20 balance.

contract.dev erc20-balance set 0x1111... 0xA0b8...eB48 0

Same arguments as erc20-balance add.

Notes

  • These commands write the token’s balanceOf storage slot directly. The token’s totalSupply is not adjusted — if your code reads it, set it with state set-storage.
  • ERC20s with non-standard layouts (e.g. rebasing tokens) may not be writable; use state set-storage in that case.
  • For native balances, use balance.
Last updated on