$ forge test --match-contract VaultTest -vvv --gas-report
[⠒] Compiling 6 files with Solc 0.8.24...
[PASS] VaultTest::test_deposit_emits_event() gas: 89_234
[PASS] VaultTest::test_withdraw_updates_balance() gas: 54_891
[PASS] VaultTest::test_reentrancy_guard_reverts() gas: 32_104
[PASS] VaultTest::test_only_owner_can_pause() gas: 28_776
[PASS] VaultTest::testFuzz_deposit_amount(uint256) runs: 256
Suite result: ok. 5 passed; 0 failed; finished in 1.24s
Total gas used: 305_011
$ ▋
$ cast call 0xC02aaA…6Cc2 "balanceOf(address)(uint256)" $MY_ADDR
→ 4_200_000_000_000_000_000 (≈ 4.200 WETH, 18 decimals)
$ cast tx 0xd04b…3a71 --rpc-url $MAINNET_RPC_URL
blockNumber: 19_834_201 status: success
gasUsed: 68_432 gasPrice: 12.8 gwei
effectiveGasPrice: 12_834_021 wei EIP-1559 base fee
$ ▋
$ forge script script/Deploy.s.sol:Deploy --broadcast --verify
--rpc-url $SEPOLIA_RPC_URL --private-key $DEPLOYER_PK
[⠒] Compiling 3 files with Solc 0.8.24...
✓ Simulation OK — Deployer: 0x1234…abcd balance: 0.50 ETH
✓ Deployed ERC20Token → 0x8f3a…4b2c block: 5_834_201
gas used: 1_243_876 cost: 0.0018 ETH (12.8 gwei)
✓ Contract ERC20Token verified on Etherscan (Sepolia)
$ ▋
$ npx hardhat test test/ERC20Token.ts --bail --network hardhat
ERC20Token contract
Deployment
✓ Should initialize deployer as contract owner (82ms)
✓ Should mint total supply to owner on deploy (41ms)
Transfers
✓ Should transfer tokens correctly between accounts (63ms)
✓ Should emit Transfer event on successful send (55ms)
✓ Should revert if sender has insufficient funds (38ms)
5 passing (281ms)
$ ▋
$ ts-node scripts/interact.ts --network mainnet --gas-price 15
Provider: Alchemy (eth-mainnet) block: 19_834_201
Contract: 0x7a25…f1e9 (ERC20, Mainnet — verified)
→ calling: approve(spender: 0xDef1…2086, amount: MaxUint256)
✓ txHash: 0xd04b3a71…8f2c
block: 19_834_205 gasUsed: 68_432 (12.8 gwei)
status: success confirmations: 3
$ ▋