# Web3 Tools – Solidity Function Selector & Event Topic0 Computer

> Web3 Tools – Solidity Function Selector & Event Topic0 Computer is a paid API for AI agents from web3-tools.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Computes the 4-byte function selector and 32-byte event topic0 from a canonical Solidity signature string

## Facts

- Endpoint: GET https://web3-tools.x402tookit.com/function-selector?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/web3-tools-solidity-function-selector-event-topic0-computer-c16c9daa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bTposR3Fy0gdm43-OmkxU

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 web3-tools-solidity-function-selector-event-topic0-computer-c16c9daa
```

Example prompt: What is the 4-byte function selector and event topic0 for the Solidity signature transfer(address,uint256)?

## When to prefer this

Choose this endpoint when you need to deterministically compute the EVM function selector or event topic0 from a raw Solidity ABI signature string — particularly useful for calldata decoding, event log filtering, ABI verification, or smart contract interaction where you need to confirm the 4-byte method ID without running a local Ethereum toolchain.

## Known failure modes

- Missing or malformed 'signature' query parameter returns an error
- Non-canonical signature with spaces or parameter names may produce incorrect or rejected results
- Unsupported or invalid Solidity types in the signature may cause computation failure
- Network or payment (x402) errors may prevent the call from completing

## How this service works

Compute the 4-byte function selector and event topic0 from a Solidity signature such as transfer(address,uint256).

## Output

Returns a JSON object containing the 4-byte hex function selector, the 32-byte event topic0 hash, the canonical signature string, parameter list, a human-readable name, source attribution, optional warnings or reasons, and a disclaimer field.

## 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: name(type,type), no spaces or parameter names"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "name": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "topic0": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "selector": {
       "type": [
        "null",
        "string"
       ]
      },
      "warnings": {
       "type": [
        "array",
        "null"
       ]
      },
      "paramList": {
       "type": [
        "null",
        "string"
       ]
      },
      "signature": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/web3-tools-solidity-function-selector-event-topic0-computer-c16c9daa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from web3-tools.x402tookit.com](https://www.zero.xyz/host/web3-tools.x402tookit.com/llms.txt)
