# PreFlight – Decode TX Calldata

> PreFlight – Decode TX Calldata is a paid API for AI agents from meryol-agenticmarket-x402.hf.space, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Decodes EVM transaction calldata and flags red-flag patterns (e.g. unlimited approvals, unverified spenders) before an agent signs

## Facts

- Endpoint: POST https://meryol-agenticmarket-x402.hf.space/decode/tx
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/preflight-decode-tx-calldata-9656afbd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bOT93gEWEihuI95I3M1__

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 preflight-decode-tx-calldata-9656afbd -d '<json body>'
```

Example prompt: Before I sign this transaction, decode the calldata for me and flag any red flags — the contract is 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on Ethereum and the calldata starts with 095ea7b3 approving 0xdeadbeef... for a max uint256 amount.

## When to prefer this

Use this endpoint when an AI agent needs to understand and safety-check a raw EVM transaction before submitting it — especially for token approvals, DeFi interactions, or any calldata received from an untrusted source. Prefer this over generic ABI decoders when you need red-flag detection (unlimited approvals, unverified spenders) alongside decoding in a single pre-sign check.

## Known failure modes

- Malformed or non-hex calldata returns a decode error
- Unknown function selector not in ABI database returns partial decode
- Unsupported chain identifier returns 400 validation error
- Network timeout or HuggingFace Space cold-start latency spike
- Payment not attached or insufficient USDC returns 402 error

## How this service works

Pre-trade & pre-sign checks for autonomous agents: everything an agent verifies BEFORE signing a transaction — token due diligence, calldata red-flag decoding, oracle freshness, holder concentration, bridge routing with executable calldata, cross-venue perp funding, gas and price sanity checks. EVM chains: Ethereum, Base, Arbitrum, Optimism.

## Output

Returns the decoded function signature, selector, typed argument list (with types and values), a human-readable summary of what the transaction does, and an array of red-flag labels such as 'unlimited_token_approval' or 'approval_to_unverified_contract'.

## 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": {
     "required": [
      "chain",
      "to",
      "data"
     ],
     "properties": {
      "to": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$"
      },
      "data": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]+$"
      },
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism"
       ],
       "type": "string"
      },
      "value": {
       "type": "string"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "chain",
      "to",
      "selector",
      "summary",
      "red_flags"
     ],
     "properties": {
      "to": {
       "type": "string"
      },
      "args": {
       "type": "array"
      },
      "chain": {
       "type": "string"
      },
      "summary": {
       "type": "string"
      },
      "selector": {
       "type": "string"
      },
      "red_flags": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "signature": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "args": [
   {
    "type": "address",
    "value": "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
   },
   {
    "type": "uint256",
    "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
   }
  ],
  "chain": "ethereum",
  "summary": "Approve spender 0xdeadbeef... to spend UNLIMITED on token USDC",
  "selector": "095ea7b3",
  "red_flags": [
   "unlimited_token_approval",
   "approval_to_unverified_contract"
  ],
  "signature": "approve(address,uint256)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/preflight-decode-tx-calldata-9656afbd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from meryol-agenticmarket-x402.hf.space](https://www.zero.xyz/host/meryol-agenticmarket-x402.hf.space/llms.txt)
