Function Selector (Solidity)
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.
Offering
- Provider
- api.duoleads.com
- Method
- GET
- Offering type
- Api Endpoint
- Transport type
- http
- Category
- Blockchain And Crypto
- Delivery
- Not provided
- Pricing model
- Not provided
- x402 version
- 2
Endpoint context
- URL
https://api.duoleads.com/v1/chain/selector- MIME type
- application/json
- First seen
- 2026-10-16T01:50:38.788Z
- Last seen
- Tags
- function-selector, solidity, keccak256, blockchain, keccak
Payment pricing
x402 payment terms are the authoritative price for calling this endpoint.
- Payment option 1
- 0.05 USDC
Atomic price: 50000 · Network: eip155:8453 · Asset: USDC · Scheme: exact
Raw x402 terms
[
{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "50000",
"payTo": "0xCD673f7e1daD254347AEab6be0DEFe8b9C6b3A39"
}
]Observed health
- Status
- Healthy
- Latest latency
- 48 ms
- Average latency
- 1063 ms
- HTTP status
- 402
- Last checked
- Reachability
- 100% over 14 checks
Latency is measured to the first response headers. A reachable result does not verify response accuracy or merchant identity.
Input schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "http"
},
"method": {
"type": "string",
"enum": [
"GET"
]
},
"queryParams": {
"type": "object",
"properties": {
"signature": {
"type": "string",
"description": "Solidity function, event or error signature, e.g. transfer(address to, uint amount).",
"maxLength": 1024
},
"data": {
"type": "string",
"description": "Alternative to signature: raw data to Keccak-256 hash.",
"maxLength": 8192
},
"encoding": {
"type": "string",
"description": "Encoding of data: utf8 (default) or hex.",
"enum": [
"utf8",
"hex"
],
"maxLength": 64,
"default": "utf8"
},
"kind": {
"type": "string",
"description": "function (default), event or error.",
"enum": [
"function",
"event",
"error"
],
"maxLength": 64,
"default": "function"
}
},
"required": []
}
},
"required": [
"type",
"method"
],
"additionalProperties": false
}Output schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"method": {
"enum": [
"GET"
],
"type": "string"
},
"queryParams": {
"properties": {
"data": {
"description": "Alternative to signature: raw data to Keccak-256 hash.",
"maxLength": 8192,
"type": "string"
},
"encoding": {
"default": "utf8",
"description": "Encoding of data: utf8 (default) or hex.",
"enum": [
"utf8",
"hex"
],
"maxLength": 64,
"type": "string"
},
"kind": {
"default": "function",
"description": "function (default), event or error.",
"enum": [
"function",
"event",
"error"
],
"maxLength": 64,
"type": "string"
},
"signature": {
"description": "Solidity function, event or error signature, e.g. transfer(address to, uint amount).",
"maxLength": 1024,
"type": "string"
}
},
"required": [],
"type": "object"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"properties": {
"data": {
"properties": {
"canonical": {
"type": [
"string",
"null"
]
},
"encoding": {
"type": "string"
},
"input_bytes": {
"type": "integer"
},
"inputs": {
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"keccak256": {
"type": "string"
},
"normalisations": {
"items": {
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"from",
"to"
],
"type": "object"
},
"type": "array"
},
"selector": {
"type": [
"string",
"null"
]
},
"topic0": {
"type": [
"string",
"null"
]
}
},
"required": [
"canonical",
"keccak256",
"selector",
"topic0",
"inputs",
"normalisations"
],
"type": "object"
},
"meta": {
"properties": {
"computed_at": {
"description": "RFC 3339 UTC with milliseconds",
"type": "string"
},
"deterministic": {
"type": "boolean"
},
"disclaimer": {
"type": "string"
},
"price_usd": {
"type": "string"
},
"request_id": {
"type": "string"
},
"sources": {
"items": {
"required": [
"id",
"version",
"published"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"request_id",
"computed_at",
"price_usd",
"deterministic",
"disclaimer"
],
"type": "object"
},
"ok": {
"const": true
},
"route": {
"const": "/v1/chain/selector"
},
"version": {
"type": "string"
}
},
"required": [
"ok",
"route",
"version",
"data",
"meta"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}