# EVM Transaction Simulator (eth_call + eth_estimateGas)

> EVM Transaction Simulator (eth_call + eth_estimateGas) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Dry-runs a smart contract call or transaction on EVM-compatible networks using eth_call and eth_estimateGas without broadcasting to the blockchain.

## Facts

- Endpoint: POST https://agent402.tools/api/tx-simulate
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-transaction-simulator-eth-call-eth-estimategas-c542efb2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X1bKzxF72Nnl4OZfyIFFo

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-transaction-simulator-eth-call-eth-estimategas-c542efb2 -d '<json body>'
```

Example prompt: Before I send this transaction, can you simulate calling contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum with calldata 0x70a08231000000000000000000000000d8dA6BF26964aF9D7eEd9e03E53415D37aA96045 from my address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 and tell me the return value and estimated gas?

## When to prefer this

Use this endpoint when you need to validate or preview a smart contract interaction on any major EVM chain before committing a real transaction. Ideal for agents that need to check for reverts, estimate gas budgets, or inspect return values without risking funds or paying on-chain gas. Prefer this over calling a chain's RPC directly when you want a managed multi-chain pool that already handles endpoint failover across ethereum, base, polygon, arbitrum, and optimism.

## Known failure modes

- Contract reverts: simulation succeeds but returns a revert reason string or custom error bytes
- Invalid address format: 400 error if 'to' is not a valid 0x-prefixed 40-char hex address
- Unsupported network: error if network value is not one of ethereum/base/polygon/arbitrum/optimism
- Invalid calldata: malformed 0x hex in 'data' field causes RPC-level error
- RPC pool timeout: upstream public RPC node unresponsive, returns 5xx
- Payment failure: x402 payment of $0.005 USDC not received, request rejected

## How this service works

Dry-run a prospective smart-contract call or transaction without broadcasting it: executes eth_call and eth_estimateGas against the latest block over the same keyless multi-endpoint public RPC pool as /api/evm-rpc (ethereum, base, polygon, arbitrum, optimism). Returns the return data and a gas estimate on success, or {success:false} with the revert reason when the call would fail. Strictly read-only - nothing is signed or broadcast.

## Output

Returns the eth_call return data (decoded output bytes from the contract) and the eth_estimateGas value (integer gas units required), giving the agent visibility into whether the transaction would succeed, what it would return, and how much gas it would consume — all without submitting anything to the chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "to": {
   "type": "string",
   "description": "0x-prefixed 40-char target contract/account address."
  },
  "data": {
   "type": "string",
   "description": "0x-prefixed calldata (default 0x - plain value transfer)."
  },
  "from": {
   "type": "string",
   "description": "Optional sender address (default zero address)."
  },
  "value": {
   "type": "string",
   "description": "Optional value in wei - decimal string or 0x hex (default 0)."
  },
  "network": {
   "type": "string",
   "description": "ethereum / base / polygon / arbitrum / optimism (default base)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "network": "base",
  "success": true,
  "returnData": "0x00000000000000000000000000000000000000000000000000000000000f4240",
  "gasEstimate": 31234,
  "revertReason": null
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-transaction-simulator-eth-call-eth-estimategas-c542efb2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
