# EVM Calldata Decoder

> EVM Calldata Decoder is a paid API for AI agents from api.anchor-x402.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Decodes raw EVM calldata hex into a human-readable function name and typed parameter list via openchain.xyz

## Facts

- Endpoint: POST https://api.anchor-x402.com/v1/decode/calldata
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-anchor-x402-com-8ba81db6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__SBLBaHtrWajaSzYhgFpN

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 api-anchor-x402-com-8ba81db6 -d '<json body>'
```

Example prompt: Can you decode this raw EVM calldata for me and tell me which function it's calling and what the typed arguments are: 0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b0000000000000000000000000000000000000000000000000de0b6b3a7640000?

## When to prefer this

Use this endpoint when you have a raw hex calldata string from an EVM transaction and need to understand which smart contract function it invokes and with what parameters, without needing to supply your own ABI. Especially useful for transaction auditing, wallet activity explanation, or debugging on-chain interactions.

## Known failure modes

- Unknown or unregistered 4-byte selector — openchain.xyz has no matching signature, returns null or error
- Malformed hex input — calldata is not valid hex or is truncated
- ABI mismatch — selector is known but arguments cannot be decoded against any known ABI
- Payment failure — x402 USDC payment not accepted or insufficient funds

## How this service works

Decode raw EVM calldata into function + typed params via openchain.xyz — $0.001 USDC

## Output

Returns the decoded function name/signature and a list of typed, named parameters extracted from the calldata hex, making raw transaction input data human-readable.

## Example request

```json
{
 "input": {
  "body": {
   "chain": "ethereum",
   "calldata_hex": "0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9b0000000000000000000000000000000000000000000000000de0b6b3a7640000"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {
      "chain": {
       "type": "string",
       "enum": [
        "ethereum",
        "solana"
       ],
       "description": "EVM-only; \"solana\" returns 400."
      },
      "calldata_hex": {
       "type": "string",
       "description": "Raw EVM calldata (>=4 byte selector), with or without 0x prefix."
      },
      "contract_address": {
       "type": "string",
       "description": "Optional. Reserved for future on-chain ABI lookups."
      }
     },
     "required": [
      "chain",
      "calldata_hex"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "params": [
   {
    "name": null,
    "type": "address",
    "value": "0xab5801a7d398351b8be11c439e05c5b3259aec9b"
   },
   {
    "name": null,
    "type": "uint256",
    "value": "1000000000000000000"
   }
  ],
  "source": "openchain.xyz",
  "decoded": true,
  "candidates": [],
  "function_name": "transfer",
  "function_selector": "0xa9059cbb",
  "function_signature": "transfer(address,uint256)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-anchor-x402-com-8ba81db6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.anchor-x402.com](https://www.zero.xyz/host/api.anchor-x402.com/llms.txt)
