# x402engine EVM Transaction Simulator

> x402engine EVM Transaction Simulator is a paid API for AI agents from x402engine.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-20).

Simulates an EVM transaction before broadcast, returning gas estimates, execution traces, and revert reasons

## Facts

- Endpoint: POST https://x402engine.app/api/tx/simulate?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402engine-evm-transaction-simulator-751b452f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SDAYY3Pmwc-SnqCS2fJxI

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 x402engine-evm-transaction-simulator-751b452f -d '<json body>'
```

Example prompt: Before I send this transaction, can you simulate it on Ethereum mainnet — I'm calling the USDC contract at 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 from 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 with this calldata and tell me the gas estimate and whether it would revert?

## When to prefer this

Choose this endpoint when you need to pre-flight an EVM transaction on any supported chain (mainnet, Base, Optimism, etc.) before actually broadcasting it — ideal for catching reverts, estimating gas accurately, or debugging calldata without spending real gas or risking failed on-chain transactions. Prefer this over node-level eth_call when you also want structured execution traces and decoded revert reasons in a single pay-per-call API without managing RPC infrastructure.

## Known failure modes

- Invalid or malformed address returns a validation error
- Unsupported network_id returns an error indicating the chain is not available
- Malformed calldata hex string causes a simulation failure
- Insufficient gas limit causes the simulation to revert with out-of-gas
- Contract state at simulation time may differ from broadcast time, leading to stale results
- Payment failure ($0.01 USDC not provided) results in HTTP 402 rejection

## How this service works

x402engine — Simulate EVM transactions before sending — get gas estimates, execution traces, and revert reasons

## Output

Returns a simulation result including predicted gas usage, full execution trace of EVM opcodes and calls, and if applicable a decoded revert reason explaining why the transaction would fail — all without submitting anything to the blockchain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "network_id",
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
       "description": "Recipient/contract address"
      },
      "gas": {
       "type": "number",
       "description": "Gas limit"
      },
      "data": {
       "type": "string",
       "description": "Transaction calldata (hex string)"
      },
      "from": {
       "type": "string",
       "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
       "description": "Sender address"
      },
      "value": {
       "type": "string",
       "example": "0",
       "description": "ETH value in wei"
      },
      "network_id": {
       "type": "string",
       "example": "1",
       "description": "Network ID (1=mainnet, 8453=Base, 10=Optimism, etc.)"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402engine-evm-transaction-simulator-751b452f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402engine.app](https://www.zero.xyz/host/x402engine.app/llms.txt)
