# Transaction Pre-flight Check

> Transaction Pre-flight Check is a paid API for AI agents from api.eucompliance.tools, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-12).

Runs six pre-send checks on a blockchain transaction—gas vs balance, full simulation with decoded revert reason, stuck nonces, recipient type, ERC-20 allowance, and sanctions screening—and returns a send/do-not-send verdict with all reasons.

## Facts

- Endpoint: GET https://api.eucompliance.tools/x402/preflight?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/transaction-pre-flight-check-15729529
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GLowBUosCsxDajMxW5tj5

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 transaction-pre-flight-check-15729529
```

Example prompt: Before I send this transaction from 0xAbC...123 to the contract 0xDEF...456 on Base with 0.5 ETH attached, run a full pre-flight check—simulate the call, verify I have enough gas, confirm the recipient isn't sanctioned, and tell me whether it's safe to send.

## When to prefer this

Choose this endpoint when you need a comprehensive go/no-go decision on a transaction before committing gas, especially when you want simulation, sanctions, allowance, and nonce checks in a single call rather than querying separate APIs. Prefer it over basic gas estimation when revert diagnosis, AML compliance, or counterparty risk are also concerns. It is particularly valuable for DeFi automation, payment agents, and any workflow where a failed or sanctioned transaction would cause downstream problems.

## Known failure modes

- Missing required 'sender' or 'to' query parameters returns a 400 error
- Unsupported chain value outside the allowed enum causes a validation error
- Simulation may time out for complex contracts on congested networks
- Sanctions data may have brief staleness windows between list updates
- ERC-20 checks require 'token' and 'amount' params; omitting them skips that sub-check
- Node RPC errors for the target chain may cause simulation failures with a service error response

## How this service works

Will this transaction go through? Six checks before any gas is spent: gas vs balance, full simulation with the revert reason decoded, stuck nonces, contract or wallet recipient, ERC-20 allowance, and a sanctions screen of the counterparty. Returns send / do not send with every reason.

## Output

A structured verdict (send / do not send) accompanied by the result of each of the six checks: gas coverage, transaction simulation with decoded revert reason if applicable, nonce status, recipient classification (contract vs EOA), ERC-20 allowance adequacy, and sanctions screening outcome for the counterparty. Any failing check includes a human-readable reason.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "sender",
      "to"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "contract or wallet being called"
      },
      "data": {
       "type": "string",
       "description": "calldata hex, default 0x"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "arbitrum",
        "optimism",
        "polygon"
       ],
       "type": "string"
      },
      "token": {
       "type": "string",
       "description": "optional ERC-20 to check balance/allowance for"
      },
      "amount": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "number"
        }
       ],
       "description": "exact token amount intended; decimal string preferred"
      },
      "sender": {
       "type": "string",
       "description": "the wallet that would send"
      },
      "spender": {
       "type": "string",
       "description": "optional spender, defaults to 'to'"
      },
      "value_eth": {
       "oneOf": [
        {
         "type": "string"
        },
        {
         "type": "number"
        }
       ],
       "description": "exact native value to attach; decimal string preferred"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/transaction-pre-flight-check-15729529/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.eucompliance.tools](https://www.zero.xyz/host/api.eucompliance.tools/llms.txt)
