# ABI Selector Map Generator

> ABI Selector Map Generator is a paid API for AI agents from x402-audit.tatschluizguilherme.workers.dev, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Generates a complete selector map from a contract ABI — 4-byte selectors for functions/errors and 32-byte topic0 for events — entirely offline with no RPC or API key required

## Facts

- Endpoint: GET https://x402-audit.tatschluizguilherme.workers.dev/abi
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/abi-selector-map-generator-d752a4f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S_WLtK_-omX1S82uadm3N

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 abi-selector-map-generator-d752a4f8
```

Example prompt: Take this ERC-20 contract ABI and generate the full selector map for me — I need the 4-byte selectors and canonical signatures for every function, topic0 hashes for every event with their indexed flags, and 4-byte selectors for every error, all computed offline without any RPC call.

## When to prefer this

Choose this endpoint when you need to compute EVM function selectors, event topic0 hashes, or error selectors from a contract ABI entirely offline — no blockchain node, no Etherscan API key, no network latency. Ideal for tooling pipelines, calldata routers, event decoders, or any workflow that needs a complete selector dictionary from an ABI JSON instantly. Prefer over RPC-based approaches when chain-agnosticism and determinism matter, or when you want to verify decode coverage against a known selector dictionary.

## Known failure modes

- Malformed or invalid ABI JSON returns a parse error
- ABI entries missing required fields (type, name, inputs) cause incomplete selector generation
- Empty ABI array returns an empty selector map with no entries
- Non-standard or experimental ABI entry types may be skipped or flagged
- Oversized ABI payloads may hit Cloudflare Worker request size limits
- Payment failure (x402) blocks request before processing

## How this service works

Pay-per-call on-chain API for AI agents and developers: wallet audits, token safety audits (honeypot detection), live gas prices, token prices, transaction receipts, balances, ENS resolution, block data, ERC-20 allowances, transaction simulation, swap quotes and multicall batches — all computed on-chain via public RPCs (no external market API). Pay per request in USDC on Base via the x402 exact scheme (EIP-3009 transferWithAuthorization). No API key, no signup, no subscription.

## Output

Returns a complete selector map object containing: for each function — the 4-byte hex selector, canonical signature string, and typed input/output parameter list; for each event — the 32-byte hex topic0, canonical signature, indexed/anonymous flags per parameter; for each error — the 4-byte hex selector and canonical signature. Also includes a verification object (verify.known) indicating which entries the API's decode dictionary can already decode or encode.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": {
   "other": 0,
   "errors": 0,
   "events": 1,
   "functions": 1
  },
  "other": [],
  "errors": [],
  "events": [
   {
    "name": "Transfer",
    "inputs": [
     {
      "name": "from",
      "type": "address",
      "indexed": true
     },
     {
      "name": "to",
      "type": "address",
      "indexed": true
     },
     {
      "name": "value",
      "type": "uint256",
      "indexed": false
     }
    ],
    "topic0": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
    "verify": {
     "name": "Transfer",
     "known": true
    },
    "anonymous": false,
    "signature": "Transfer(address,address,uint256)"
   }
  ],
  "network": "offline",
  "functions": [
   {
    "name": "transfer",
    "inputs": [
     {
      "name": "to",
      "type": "address"
     },
     {
      "name": "value",
      "type": "uint256"
     }
    ],
    "verify": {
     "args": [
      "address",
      "uint256"
     ],
     "name": "transfer",
     "known": true
    },
    "outputs": [],
    "selector": "0xa9059cbb",
    "signature": "transfer(address,uint256)",
    "stateMutability": "nonpayable"
   }
  ],
  "requestedAt": "2026-08-05T10:00:00.000Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/abi-selector-map-generator-d752a4f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-audit.tatschluizguilherme.workers.dev](https://www.zero.xyz/host/x402-audit.tatschluizguilherme.workers.dev/llms.txt)
