# Ethereum Selector / Event Topic Hash Lookup

> Ethereum Selector / Event Topic Hash Lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Resolves a 4-byte Ethereum function selector or 32-byte event topic hash to its known human-readable Solidity signatures using openchain.xyz with 4byte.directory as fallback.

## Facts

- Endpoint: POST https://agent402.tools/api/selector-lookup
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ethereum-selector-event-topic-hash-lookup-e2d67055
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_p4U6NyeKkunVyy6Wmcwd9

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 ethereum-selector-event-topic-hash-lookup-e2d67055 -d '<json body>'
```

Example prompt: Can you look up what Solidity function the 4-byte selector 0xa9059cbb maps to? I'm trying to decode some Ethereum transaction calldata.

## When to prefer this

Use this endpoint when you need to decode raw Ethereum calldata or event logs by resolving 4-byte function selectors or 32-byte event topic hashes to human-readable Solidity signatures. Prefer this over manual ABI lookups when you don't have the contract's ABI on hand, or when debugging unknown contract interactions. It covers a broad corpus via openchain.xyz with 4byte.directory as fallback, maximizing match probability.

## Known failure modes

- Unknown selector returns {found: false} with empty signatures list — not an error, just not in the database
- Invalid hex format or wrong length (not 10 chars for function selector or 66 chars for event topic) may return an error
- Upstream openchain.xyz and 4byte.directory both unavailable causes lookup failure
- Malformed 0x-prefix or non-hex characters cause validation failure

## How this service works

Resolve a 4-byte function selector or a 32-byte event topic hash to its known human-readable Solidity signatures, via the openchain.xyz signature database with 4byte.directory as fallback. Unknown selectors return {found:false} with an empty list, not an error.

## Output

Returns an object indicating whether the selector was found (found: true/false) and a list of matching human-readable Solidity function or event signatures (e.g. 'transfer(address,uint256)'). Unknown selectors return {found: false} with an empty list.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "selector": {
   "type": "string",
   "description": "0x-prefixed 4-byte function selector (10 chars) or 32-byte event topic hash (66 chars)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "function",
  "found": true,
  "source": "openchain.xyz",
  "selector": "0xa9059cbb",
  "signatures": [
   "transfer(address,uint256)"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ethereum-selector-event-topic-hash-lookup-e2d67055/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)
