# EVM Decode Signature

> EVM Decode Signature is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-12).

Reverse a 4-byte function selector, event topic0 hash, or raw calldata into a human-readable Solidity signature using the 4byte database, with collision resolution and parameter type parsing.

## Facts

- Endpoint: GET https://payai.agentstools.dev/evm/decode-signature?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-decode-signature-212db6d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cBmq14RLZFGgjIV9QY4MD

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-decode-signature-212db6d3
```

Example prompt: What Solidity function does the selector 0xa9059cbb map to? Decode it using the 4byte database and give me the full signature with parameter types, flagging any collision lookalikes.

## When to prefer this

Use this endpoint when you need to decode an unknown EVM function selector, event topic hash, or raw calldata into a human-readable Solidity signature, especially when collision safety matters. Prefer this over raw 4byte.directory queries when you need collision resolution (real vs attacker-registered signatures) and structured parameter type parsing in a single call.

## Known failure modes

- Selector or topic0 not found in 4byte database — returns empty or not-found response
- Invalid hex format for selector/topic0/input — returns validation error
- Selector is ambiguous with multiple unresolvable collisions — multiple results returned with collision flags
- Fewer than 4 bytes provided in raw calldata — cannot extract selector

## How this service works

Reverse a 4-byte function selector, an event topic hash, or raw calldata into its human-readable signature using the 4byte database, with collisions resolved so the real signature (the oldest registered) is returned first and the attacker-registered lookalikes are flagged. Parameter types are parsed out.

## Output

Returns the canonical human-readable Solidity function or event signature (oldest registered entry first), the parsed parameter types, and any collision entries (attacker-registered lookalikes) flagged separately.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "input": {
       "type": "string",
       "description": "Raw calldata or hex; the first 4 bytes are taken as the selector (alternative to selector/topic0)"
      },
      "topic0": {
       "type": "string",
       "description": "Event topic0 hash (0x + 64 hex)"
      },
      "selector": {
       "type": "string",
       "description": "4-byte function selector (0x + 8 hex)"
      }
     }
    }
   },
   "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/evm-decode-signature-212db6d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
