# ABI Calldata Decoder

> ABI Calldata Decoder is a paid API for AI agents from defi-shield-hazel.vercel.app, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-14).

Decodes ABI-encoded Ethereum calldata into human-readable function name and parameters using the 4byte directory

## Facts

- Endpoint: POST https://defi-shield-hazel.vercel.app/api/data/abi-decode
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-shield-hazel-vercel-app-b04b0c05
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kl-h5kT4PwW_cWXvrxIuK

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 defi-shield-hazel-vercel-app-b04b0c05 -d '<json body>'
```

Example prompt: Can you decode this Ethereum calldata for me — 0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000016345785d8a0000 — sent to contract 0xdac17f958d2ee523a2206206994597c13d831ec7? I want to know what function is being called and what the parameters are.

## When to prefer this

Use this endpoint when you need to interpret raw hex calldata from an Ethereum transaction and understand what function is being invoked and with what arguments. Ideal for transaction monitoring, auditing, debugging smart contract interactions, or building human-readable transaction summaries. Prefer this over manual ABI lookups when you don't have the ABI locally but have the calldata hex.

## Known failure modes

- Unknown function selector — calldata selector not found in 4byte directory, returns partial result with possible_functions empty
- Malformed calldata — invalid hex or truncated data causes decoding failure
- Ambiguous selector — multiple candidate signatures matched, decoded_params may reflect wrong one
- Contract address not needed for decoding — omitting it does not affect result but context may be lost
- Rate limiting or payment failure — x402 payment not processed, returns 402 error

## Output

Returns a JSON object with: success flag, function_name (from 4byte directory lookup), function_selector (4-byte hex), decoded_params (key-value map of parameter names and values), param_count, possible_functions (list of candidate signatures matching the selector), abi_source, raw_calldata, and response_time_ms.

## Example request

```json
{
 "calldata": "0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000016345785d8a0000",
 "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "bodyType",
    "body",
    "method"
   ],
   "properties": {
    "body": {
     "properties": {
      "abi": {
       "type": "array",
       "description": "Optional ABI array for custom decoding"
      },
      "calldata": {
       "type": "string",
       "description": "Hex-encoded calldata to decode"
      },
      "to_address": {
       "type": "string",
       "description": "Optional contract address to auto-fetch ABI"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-shield-hazel-vercel-app-b04b0c05/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-shield-hazel.vercel.app](https://www.zero.xyz/host/defi-shield-hazel.vercel.app/llms.txt)
