Set Native Balances
Change the native token balance of any address on your Stagenet from the command line — for funding test wallets, wiping accounts, or pinning a balance during a debugging session.
This CLI wraps the balance SDK methods. Use the SDK directly when you want the same actions driven from a script.
Usage
With a contract.dev.js at your project root (see Setup):
contract.dev balance <subcommand>balance add
Add amount to an account’s native balance.
contract.dev balance add 0x1111... 1000000000000000000 # +1 ETH (wei, decimal)
contract.dev balance add 0x1111... 0xde0b6b3a7640000 # +1 ETH (wei, hex)
contract.dev balance add 0x1111... "1 ether" # unit suffix
contract.dev balance add 0x1111... "1000000 wei"| Argument | Description |
|---|---|
<address> | The account to credit |
<amount> | Amount in wei. Accepts decimal, 0x-hex, or a wei/ether unit suffix. |
Sample output:
Added ETH balance for 0x1111111111111111111111111111111111111111 (+1.0 ETH)
new balance: 5.0 ETHThe native token symbol (ETH / MON / POL / HYPE) is detected from the Stagenet’s fork chain.
balance set
Overwrite an account’s native balance.
contract.dev balance set 0x1111... 0 # wipe
contract.dev balance set 0x1111... "5 ether" # exactly 5 ETHSame arguments as balance add. Sample output:
Set ETH balance for 0x1111111111111111111111111111111111111111 (= 5.0 ETH)
new balance: 5.0 ETHNotes
For ERC20 balances, use erc20-balance.
Last updated on