EVM
Function selector / event topic API
Compute the 4-byte function selector or 32-byte event topic hash from a human-readable signature. Answers 'selector for transfer(address,uint256)', 'event topic hash', 'what's the 4byte for this function'.
Price$0.01per request
MethodPOST
Route/v1/evm/function-selector
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
evmselector4byteeventtopicabikeccak
API URL
Integration docshttps://x402.hexl.dev/v1/evm/function-selectorExample request
{
"signature": "transfer(address,uint256)",
"type": "function"
}Example response
{
"signature": "transfer(address,uint256)",
"type": "function",
"selector": "0xa9059cbb"
}Input schema
{
"type": "object",
"required": [
"signature"
],
"properties": {
"signature": {
"type": "string",
"examples": [
"transfer(address,uint256)"
]
},
"type": {
"type": "string",
"enum": [
"function",
"event"
],
"default": "function"
}
}
}Output schema
{
"type": "object",
"required": [
"signature",
"type",
"selector"
],
"properties": {
"signature": {
"type": "string"
},
"type": {
"type": "string"
},
"selector": {
"type": "string"
}
}
}