← Back to directory

Solidity function selector: Keccak-256, 4-byte selector and event topic from a signature

https://api.duoleads.com/v1/chain/selector

Overview

Solidity function selector and event topic: compute the Keccak-256 hash of a function or event signature and derive the 4-byte selector and the 32-byte topic. Normalises the signature first — strips parameter names, expands uint to uint256 and the other aliases, flattens tuples — so a signature copied from source code produces the same selector as the canonical form. Also hashes arbitrary text or hex bytes with Keccak-256.

Protocol x402
Price $0.05
Payment Asset USD Coin
Payment Network eip155:8453
Category crypto/onchain
Provider duoleads
Source bazaar
Indexed 2026-09-29 00:13:45

Health

Status healthy
Latency (p50) 600ms
Uptime (30d) 97.0%
Reliability Score 88.5/100
Last Checked 2026-10-31 07:02:50
Last Healthy 2026-10-31 07:02:50
Consecutive Failures 0

x402 Payment Validation

Payment Requirements Valid
Asset Verified Known USDC
Facilitator —

Input Schema

{ "method": "GET", "queryParams": { "signature": "transfer(address,uint256)" }, "type": "http" }

Output Schema

{ "example": { "data": { "canonical": "transfer(address,uint256)", "inputs": [ "address", "uint256" ], "keccak256": "0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b", "normalisations": [], "selector": "0xa9059cbb", "topic0": null }, "meta": { "computed_at": "2026-09-28T12:00:00.000Z", "deterministic": true, "disclaimer": "Factual output of a deterministic computation over public data. Provided as is, with no warranty of accuracy, completeness or availability. Not investment, financial, legal, tax, medical or any other professional advice, and not a recommendation. Verify before relying on it. Terms: https://api.duoleads.com/terms", "price_usd": "0.05", "request_id": "01K6B7Q4ZC8H3F2M9WXR5TYN0D" }, "ok": true, "route": "/v1/chain/selector", "version": "1.0.0" }, "type": "json" }