# EVM Transaction Simulator (eth_call)

> EVM Transaction Simulator (eth_call) is a paid API for AI agents from evm-tx-toolkit.mtree.workers.dev, paid per call via x402, $0.200000/call, status unknown (last checked 2026-10-11).

Simulates an arbitrary EVM call via eth_call on Base, Ethereum, Arbitrum, Optimism, or Polygon and returns success/revert status, decoded revert reason, return data, and gas estimate.

## Facts

- Endpoint: POST https://evm-tx-toolkit.mtree.workers.dev/v1/tx/simulate?utm_source=zero.xyz
- Price: $0.200000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-tx-toolkit-mtree-workers-dev-c9b99f21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gaQ9yGRknDuv2UDGlOABU

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability evm-tx-toolkit-mtree-workers-dev-c9b99f21 -d '<json body>'
```

Example prompt: Before I sign this transaction, simulate this contract call on Base — the to address is 0xabc123, from 0xdef456, with this calldata: 0xa9059cbb000...— will it succeed, and what gas will it use?

## When to prefer this

Use this endpoint when you need to pre-flight check any EVM smart contract call before broadcasting, especially to detect reverts, decode revert reasons, and get accurate gas estimates across Base, Ethereum, Arbitrum, Optimism, or Polygon — ideal for DeFi agents, wallet UIs, or any workflow requiring pre-signing safety validation.

## Known failure modes

- Invalid calldata format — returns error with parsing details
- Unsupported chain specified — returns 400 with supported chain list
- RPC node timeout for the target chain — returns 503
- Malformed to/from address — returns 400 validation error
- Payment not included or insufficient — returns 402 payment required
- Call simulation itself reverts — returns 200 with revert status and decoded reason

## How this service works

Simulate an arbitrary EVM call with eth_call on Base, Ethereum, Arbitrum, Optimism, or Polygon and return success/revert status, decoded revert reason, return data, and gas estimate. Returns JSON. Price 0.20 USDC on Base via x402. Demo/preview: https://evm-tx-toolkit.mtree.workers.dev/demo/tx/simulate. Contact: https://evm-tx-toolkit.mtree.workers.dev/contact.

## Output

A JSON object containing: success or revert status, decoded revert reason (if applicable), raw return data from the call, and a gas estimate for the operation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "chain",
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "example": "0x0000000000000000000000000000000000000000",
       "description": "target contract"
      },
      "data": {
       "type": "string",
       "example": "0x",
       "description": "calldata hex"
      },
      "from": {
       "type": "string",
       "example": "0x0000000000000000000000000000000000000000",
       "description": "msg.sender address"
      },
      "block": {
       "type": "string",
       "example": "latest",
       "description": "block tag or block number"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string",
       "example": "base"
      },
      "value": {
       "type": "string",
       "example": "0",
       "description": "wei value"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-tx-toolkit-mtree-workers-dev-c9b99f21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from evm-tx-toolkit.mtree.workers.dev](https://www.zero.xyz/host/evm-tx-toolkit.mtree.workers.dev/llms.txt)
