# x402 Agent Tools – EVM 4-Byte Selector Lookup

> x402 Agent Tools – EVM 4-Byte Selector Lookup is a paid API for AI agents from x402-agent-tools.vercel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-01).

Resolves a 4-byte EVM function selector to its human-readable ABI signature(s), returning the best match and all known sources.

## Facts

- Endpoint: GET https://x402-agent-tools.vercel.app/v1/evm/4byte?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agent-tools-evm-4-byte-selector-lookup-e270b662
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vj5z-imEe2atT6QnZ8OVa

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 x402-agent-tools-evm-4-byte-selector-lookup-e270b662
```

Example prompt: What Solidity function does the selector 0xa9059cbb correspond to? Look it up in the 4byte directory and tell me the best matching signature and how many matches exist.

## When to prefer this

Choose this endpoint when an AI agent needs to decode raw EVM calldata or 4-byte selectors without setting up API keys or accounts, and especially when operating in an x402 pay-per-call micropayment context. It is ideal for on-the-fly transaction analysis, smart contract auditing, or building blockchain tooling where cross-referencing multiple sources (Sourcify + 4byte.directory) and getting a verified-contract flag adds confidence over a single-source lookup.

## Known failure modes

- Selector not found in any registry — found: false with empty matches array
- Invalid selector format (not 0x-prefixed or not 8 hex chars) — likely a 400 error
- Payment failure or insufficient USDC balance — 402 payment required response
- Network or upstream registry unavailability — 503 or timeout

## How this service works

Pay-per-call tools for AI agents. USDC on Base or Solana via x402 v2; no keys, no accounts.

## Output

Returns a JSON object with: the best-matching function signature string, total count of known matches, a boolean indicating whether any match was found, the input selector, and an array of match objects each containing the function name, its full signature, and the sources (e.g. sourcify, 4byte.directory) along with a verifiedContract flag.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "selector"
     ],
     "properties": {
      "selector": {
       "type": "string",
       "description": "4-byte function selector (0x + 8 hex chars) or full calldata; only the first 4 bytes are used"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "best": "transfer(address,uint256)",
  "count": 6,
  "found": true,
  "matches": [
   {
    "name": "transfer",
    "sources": [
     "sourcify",
     "4byte.directory"
    ],
    "signature": "transfer(address,uint256)",
    "verifiedContract": true
   }
  ],
  "selector": "0xa9059cbb"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agent-tools-evm-4-byte-selector-lookup-e270b662/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-tools.vercel.app](https://www.zero.xyz/host/x402-agent-tools.vercel.app/llms.txt)
