# EVM Calldata Decoder

> EVM Calldata Decoder is a paid API for AI agents from apexfaucet.xyz, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-19).

Decodes raw EVM calldata hex into the 4-byte selector, candidate function signatures, and decoded arguments

## Facts

- Endpoint: GET https://apexfaucet.xyz/api/x402/calldata-decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-calldata-decoder-15e5025d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DEiGB9KTolMh8cba-_EHf

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-15e5025d
```

Example prompt: Can you decode this raw EVM calldata for me and tell me what function it's calling and what arguments are being passed: 0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000016345785d8a0000

## When to prefer this

Use this endpoint when you need a quick, pay-per-use EVM calldata decoder without setting up a local ABI library or indexer. Ideal for agents that encounter raw transaction input data and need to identify the function and arguments on-the-fly across Ethereum, Base, Arc, or BNB chains. Prefer this over manual ABI decoding when you don't have the ABI and need 4-byte selector lookup with candidate signature matching.

## Known failure modes

- Invalid hex string (not starting with 0x or odd-length) returns a validation error
- Calldata shorter than 8 hex characters (less than 4 bytes) is rejected
- Input exceeding 4,000 characters is rejected
- Unknown 4-byte selector with no matching signature in the database returns empty candidates
- Malformed ABI encoding may cause decoding to fail or return partial results
- Payment failure via x402 protocol prevents the call from being processed

## How this service works

APEX. Decode raw EVM calldata. Pass ?data= (0x hex, at most 4,000 characters in all). Returns the 4-byte selector, candidate function signatures and the decoded arguments as strings (addresses checksummed, numbers in decimal, long bytes cut). ERC-20 transfer, approve and transferFrom are known locally; other selectors are looked up in the public openchain.xyz community signature database, so a match is a candidate, not proof.

## Output

Returns a JSON object with an `ok` boolean, a `paid` amount, and a `data` object containing the 4-byte function selector, one or more candidate function signatures matching that selector, and the ABI-decoded argument values extracted from the calldata.

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "string",
       "pattern": "^0x([0-9a-fA-F]{2}){4,}$",
       "maxLength": 4000,
       "description": "EVM calldata: 0x then an even number of hex digits, at least 8 (the selector), at most 4,000 characters in all."
      }
     }
    }
   }
  },
  "output": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "properties": {
   "ok": {
    "type": "boolean"
   },
   "data": {
    "type": "object"
   },
   "paid": {
    "type": "number"
   }
  }
 },
 "example": {
  "ok": true,
  "data": {
   "ok": true,
   "found": true,
   "source": "openchain.xyz public signature database (community data)",
   "selector": "0x38ed1739",
   "dataBytes": 260,
   "candidates": [
    {
     "decoded": true,
     "arguments": [
      {},
      {}
     ],
     "signature": "swapExactTokensForTokens(uint256,uint256,address[],address,uint256)",
     "matchesExactly": true
    }
   ],
   "decodedCount": 1,
   "argumentBytes": 256,
   "candidatesShown": 1,
   "candidatesChecked": 1,
   "discardedCandidates": 0,
   "candidatesInDatabase": 1
  },
  "paid": 0.002
 }
}
```

## More

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