# Solidity Function/Event Selector Calculator

> Solidity Function/Event Selector Calculator is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Computes the 4-byte function selector and full keccak256 topic hash from a Solidity ABI signature string

## Facts

- Endpoint: GET https://api.x402node.dev/crypto/selector
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solidity-function-event-selector-calculator-8db1a6e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W-_afvb4crOU9lLcyzkmn

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 solidity-function-event-selector-calculator-8db1a6e6
```

Example prompt: What's the 4-byte function selector and full keccak256 topic hash for the Solidity signature transfer(address,uint256)?

## When to prefer this

Use this endpoint when you need to programmatically compute Solidity function selectors or event topic hashes from ABI signatures without running a local Ethereum toolchain or web3 library. Ideal for decoding raw transaction inputs, filtering event logs by topic0, or building ABI-aware transaction parsers on the fly.

## Known failure modes

- Invalid or malformed Solidity signature string returns an error
- Missing signature parameter returns a 400 bad request
- Network timeout or service unavailability returns a 5xx error
- Ambiguous signature with incorrect parameter types may return unexpected selector

## How this service works

Compute the 4-byte function/error selector and full keccak topic from a solidity signature, e.g. transfer(address,uint256). For decoding tx input prefixes and matching event topics. function selector, 4byte, method id, event topic, keccak signature Accepts payment on Base or Solana — either network works.

## Output

Returns the 4-byte hex function selector (first 4 bytes of keccak256 of the signature) and the full 32-byte keccak256 topic hash, suitable for matching transaction input prefixes and EVM event topics

## 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": "canonical signature, e.g. transfer(address,uint256) (required)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solidity-function-event-selector-calculator-8db1a6e6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
