Skip to content
LogoLogo

tevm action simulate-calls

tevm action simulate-calls runs this operation: Simulate a bundle of calls without committing state. Reach for it when you need the operation from a terminal, CI job, or shell script.

Working example

The commands below were run with @tevm/cli@1.0.0-rc.151. They create their own local prerequisites or use the named public endpoint, so no hidden process is required.

npm install --global @tevm/cli@1.0.0-rc.151
tevm session docs --local --json
tevm set-account --address 0x5a0b54d5dc17e482fe8b0bdca5320161b95fb929 --balance 2000000000000000000 --session docs --run --json
tevm action simulate-calls --session docs --run --json

Output captured from the final command:

{
  "ok": true,
  "command": "simulate-calls",
  "result": {
    "assetChanges": [],
    "block": {
      "number": "1",
      "hash": "0x0a9c2eca14d1a331a1dbbeb3cf9489977d0d697bca293322001af9ceaacbf4fb",
      "timestamp": "12",
      "gasLimit": "30000000",
      "gasUsed": "0",
      "baseFeePerGas": "7",
      "logsBloom": null,
      "nonce": null,
      "transactions": [],
      "totalDifficulty": null
    },
    "results": [
      {
        "data": "0x",
        "gasUsed": "0",
        "logs": [],
        "status": "success",
        "result": null
      },
      {
        "data": "0x",
        "gasUsed": "0",
        "logs": [],
        "status": "success",
        "result": null
      }
    ]
  },
  "session": "docs"
}

Arguments and flags

The command schema in packages/tevm-cli/src/commands/action/simulateCalls.tsx exposes:

KindSyntaxDescription
Flag--account [account]Account to simulate calls from (env: TEVM_ACCOUNT)
Flag--block-number [block-number]Block number to simulate at (env: TEVM_BLOCK_NUMBER)
Flag--block-tag [block-tag]Block tag (latest, pending, etc.) to simulate at (env: TEVM_BLOCK_TAG)
Flag--calls [calls]Calls as inline JSON or a JSON file path (env: TEVM_CALLS)
Flag--trace-asset-changesWhether to trace asset changes (env: TEVM_TRACE_ASSET_CHANGES) (default: false)
Flag--trace-transfersWhether to trace transfers (env: TEVM_TRACE_TRANSFERS) (default: false)
Flag--validationWhether to enable validation mode (env: TEVM_VALIDATION) (default: false)
Flag-r, --runRun directly without interactive parameter editing (env: TEVM_RUN) (default: false)
Flag--rpc [rpc]RPC endpoint (env: TEVM_RPC)
Flag--jsonEmit the stable machine-readable JSON envelope (env: TEVM_JSON) (default: false)
Flag-h, --helpShow help

--json and --session <name> are global options accepted before routing. See the CLI overview for their environment-variable forms and execution model.

Neighbours

CLI overview · tevm set-storage-at