# EVM Calldata Decoder

> EVM Calldata Decoder is a paid API for AI agents from agent402.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Decodes EVM smart-contract transaction calldata into a human-readable function name and typed parameters using an ABI, function signature, or 4-byte selector lookup.

## Facts

- Endpoint: POST https://agent402.tools/api/calldata-decode
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-calldata-decoder-62cd086a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pjEEfJOwN3w6aBcAdGjiD

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-calldata-decoder-62cd086a -d '<json body>'
```

Example prompt: Can you decode this calldata for me: 0xa9059cbb000000000000000000000000ab5801a7d398351b8be11c439e05c5b3259aec9000000000000000000000000000000000000000000000000016345785d8a0000 — use the function signature transfer(address,uint256) so we don't need the full ABI.

## When to prefer this

Use this endpoint when you have raw EVM transaction calldata (0x-prefixed hex) and need to understand what function is being called and with what arguments. Ideal for transaction analysis, debugging contract interactions, building block explorers, or auditing on-chain activity. Prefer this over manual decoding or etherscan lookups when you want a programmatic, offline-capable decode — especially if you already have the ABI or function signature.

## Known failure modes

- Invalid or malformed calldata hex returns a parse error
- Unknown 4-byte selector with no ABI or signature provided results in an unresolvable decode error
- Calldata exceeding 100KB is rejected
- Mismatched ABI or signature causes parameter decoding to fail with a type mismatch error
- Malformed ABI JSON array causes an invalid input error

## How this service works

Decode EVM smart-contract transaction calldata into the function name and typed parameters. Supply an ABI (from /api/contract-abi) or a signature like transfer(address,uint256) for a fully offline decode; with neither, the 4-byte selector is resolved via the openchain.xyz signature database (4byte.directory fallback) and each candidate signature is tried. Unknown selectors return a documented partial decode (selector + raw 32-byte words) instead of an error.

## Output

Returns the decoded function name and a list of typed, named parameters with their values extracted from the calldata, either using the provided ABI, the supplied function signature, or a 4-byte selector resolution from a public registry.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "abi": {
   "type": "array",
   "description": "Optional contract ABI (JSON array) - enables a fully offline decode with parameter names."
  },
  "data": {
   "type": "string",
   "description": "0x-prefixed calldata (selector + encoded args). Max 100KB."
  },
  "signature": {
   "type": "string",
   "description": "Optional function signature, e.g. transfer(address,uint256) - offline decode without a full ABI."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "transfer",
  "params": [
   {
    "name": null,
    "type": "address",
    "value": "0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0"
   },
   {
    "name": null,
    "type": "uint256",
    "value": "1000000"
   }
  ],
  "source": "openchain.xyz",
  "decoded": true,
  "selector": "0xa9059cbb",
  "signature": "transfer(address,uint256)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-calldata-decoder-62cd086a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
