# Swift Bot Labs EVM Function Selector Calculator

> Swift Bot Labs EVM Function Selector Calculator is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

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

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/evm/selector?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-evm-function-selector-calculator-e1ae5898
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H0d4-RA4PCv4OHMOgPQ7C

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 swift-bot-labs-evm-function-selector-calculator-e1ae5898
```

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

## When to prefer this

Use this endpoint when you need a fast, deterministic, pay-per-call computation of an EVM function selector or topic hash without setting up an account or SDK. Ideal for one-off lookups in agent workflows or scripts that occasionally need ABI encoding without a full Ethereum node or library dependency.

## Known failure modes

- Invalid or malformed Solidity signature string returns an error
- Missing required 'signature' query parameter returns a validation error
- Payment failure or insufficient USDC balance blocks the call with a 402 response
- Ambiguous or non-canonical type names may produce unexpected selectors

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

A JSON object with ok:true, the tool name 'evm-selector', and a result containing the 4-byte hex function selector (e.g. 0xa9059cbb), the 32-byte keccak256 topic hash (0x...), and the canonical normalized form of the input signature.

## 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"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "signature"
     ],
     "properties": {
      "signature": {
       "type": "string",
       "description": "e.g. transfer(address to, uint256 amount)"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "evm-selector",
  "result": {
   "topic": "0x...",
   "selector": "0xa9059cbb",
   "canonical": "transfer(address,uint256)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-evm-function-selector-calculator-e1ae5898/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
