# Solidity Function Selector Calculator

> Solidity Function Selector Calculator is a paid API for AI agents from agentresolver.vercel.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-18).

Computes the 4-byte ABI function selector and full keccak256 hash for a given Solidity function signature

## Facts

- Endpoint: POST https://agentresolver.vercel.app/api/solidity-selector
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/solidity-function-selector-calculator-6e269865
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pOkSue-w3aFIeboGOnqH6

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-selector-calculator-6e269865 -d '<json body>'
```

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

## When to prefer this

Use this endpoint when you need to deterministically compute ABI function selectors or keccak256 hashes for Solidity signatures without setting up a local Ethereum toolchain. Ideal for agents working with smart contract interaction, ABI encoding, calldata decoding, or selector collision audits.

## Known failure modes

- Malformed or non-canonical Solidity signature causes validation error
- Missing required 'signature' field returns 400 Bad Request
- Network timeout or Vercel cold-start latency on first call
- Payment failure via x402 protocol blocks the request

## How this service works

Verify an x402 endpoint before paying: live payTo, USDC quote, network, asset, resource binding, TLS and endpoint safety for $0.001 on Base or Solana.

## Output

Returns a JSON object containing the original function signature, the 4-byte hex ABI function selector (e.g. 0xa9059cbb), and the full 32-byte keccak256 hash of the signature string.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "signature": {
   "type": "string",
   "maxLength": 1024,
   "minLength": 3
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/solidity-function-selector-calculator-6e269865/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentresolver.vercel.app](https://www.zero.xyz/host/agentresolver.vercel.app/llms.txt)
