Ethereum mainnet · eth_call
Simulate a contract read
0.01 USDC per paid request. Payments settle on Base mainnet; queried data comes from Ethereum.
Preview the price
First install the client. This example uses the Ethereum USDC contract and its decimals() selector.
npx --no-install block402-agent demo simulate quoteThe output contains the original request ID and paymentAttempted: false. No wallet key is needed for this step.
Approve, pay and read
Only after the wallet owner approves the purchase or budget and configures a dedicated mainnet buyer wallet:
npx --no-install block402-agent demo simulate pay \
--request-id REQUEST_ID --allow-pay --budget 0.05This calls decimals() on Ethereum USDC at latest state. Expected success is 0x followed by a 32-byte encoding of 6. Decode it as an unsigned integer. This is an illustrative interpretation, not a recorded paid result. The call reads state and submits no onchain transaction; it does not predict every outcome of a future transaction.
Recover without another payment
npx --no-install block402-agent demo simulate recover \
--request-id REQUEST_IDRepeat the same address or transaction input and the original request ID. Do not authorize another payment after uncertainty. Valid null and empty results are billable.
Short setup walkthrough
This walkthrough shows unpaid quote output, not a paid execution. The commands and interpretation above are its text transcript.