# EVM Transaction Preflight (Gas + USD Cost + ERC-20 Metadata)

> EVM Transaction Preflight (Gas + USD Cost + ERC-20 Metadata) is a paid API for AI agents from mi-desktop.rainbow-dab.ts.net:10000, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-18).

Returns real-time EVM chain gas prices, estimated transaction costs in USD and native token, and ERC-20 token metadata for a given address on Base and other chains.

## Facts

- Endpoint: GET https://mi-desktop.rainbow-dab.ts.net:10000/v1/evm/preflight
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-transaction-preflight-gas-usd-cost-erc-20-metadata-f8a8a585
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-HM2HgDy5-IGDtXc7HdGx

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-preflight-gas-usd-cost-erc-20-metadata-f8a8a585
```

Example prompt: Before I send a USDC transfer on Base, can you preflight the transaction and tell me the current gas price in gwei, the estimated cost in USD, and confirm the USDC contract address (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) including its decimals?

## When to prefer this

Choose this endpoint when you need a combined, single-call preflight that returns both current gas costs (in gwei and USD) AND ERC-20 token metadata before submitting an on-chain transaction — especially on Base. It is ideal for AI agent wallets that need to budget transaction fees in USD terms without holding separate oracle and token-registry subscriptions. No API key or registration is required; pay $0.002 USDC per call via x402 on Base.

## Known failure modes

- Payment not included or insufficient USDC on Base causes 402 Payment Required
- Invalid or unsupported chain ID returns empty chains array
- Unrecognized ERC-20 contract address returns empty tokens array or null metadata
- Network timeout or upstream RPC failure returns 5xx error
- Malformed query parameters may result in 400 Bad Request

## How this service works

Pay-per-request data endpoints for AI agents: crypto prices, Bybit funding APY, verified testnet airdrop landscape, DeFi stablecoin yields, GitHub trending, agent-economy market pulse, and an EVM tx preflight (gas + USD cost + ERC-20 metadata). Pay with USDC on Base via x402 - no API keys, no registration.

## Output

Returns a JSON object with an array of chain objects (chain name, chain ID, native asset USD price, gas price in gwei, estimated tx cost in USD, gas units, and native fee for a standard transfer) plus an array of ERC-20 token objects (name, symbol, contract address, decimals).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chains": [
   {
    "chain": "base",
    "chain_id": 8453,
    "native_usd": 2446.77,
    "est_tx_cost": {
     "native_transfer": {
      "usd": 0.00031,
      "gas_units": 21000,
      "native_fee": 1.26e-7
     }
    },
    "native_symbol": "ETH",
    "gas_price_gwei": 0.006
   }
  ],
  "tokens": [
   {
    "name": "USD Coin",
    "symbol": "USDC",
    "address": "0x8335...",
    "decimals": 6
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-transaction-preflight-gas-usd-cost-erc-20-metadata-f8a8a585/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mi-desktop.rainbow-dab.ts.net:10000](https://www.zero.xyz/host/mi-desktop.rainbow-dab.ts.net%3A10000/llms.txt)
