# FastX402 Solidity Selector & Event Topic Calculator

> FastX402 Solidity Selector & Event Topic Calculator is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-17).

Computes the 4-byte function selector and 32-byte event topic hash from a Solidity function or event signature string.

## Facts

- Endpoint: GET https://fastx402.tools/solidity-selector?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-solidity-selector-event-topic-calculator-84b478d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X3sRbbQy1WqtCY8vO8MG0

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 fastx402-solidity-selector-event-topic-calculator-84b478d7
```

Example prompt: What's the 4-byte selector and 32-byte event topic for the Solidity signature transfer(address,uint256)?

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call computation of a Solidity function selector or event topic hash without setting up a local keccak256 library or Ethereum node. Ideal for AI agents building or verifying calldata on-the-fly, or for filtering EVM event logs by topic in automated workflows.

## Known failure modes

- Missing or malformed signature query parameter returns an error
- Signature with invalid Solidity syntax may return unexpected hash or error
- Network timeout or service unavailability returns a non-200 response
- Payment failure via x402 protocol blocks the request before processing

## How this service works

146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object containing the original signature string, the 4-byte function selector (e.g. 0xa9059cbb), and the 32-byte event topic hash (e.g. 0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b).

## 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": [
      "signature"
     ],
     "properties": {
      "signature": {
       "type": "string",
       "description": "Solidity function or event signature, e.g. transfer(address,uint256)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "topic": {
       "type": "string"
      },
      "selector": {
       "type": "string"
      },
      "signature": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "topic": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b",
  "selector": "0xa9059cbb",
  "signature": "transfer(address,uint256)"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-solidity-selector-event-topic-calculator-84b478d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
