{"uid":"cap_WjBO1noq59EFO1L9PRf8z","slug":"solidity-function-selector-and-event-topic0-generator-d730e037","name":"Solidity Function Selector and Event Topic0 Generator","description":"60 paid endpoints with no metering, no API key and no account. Each endpoint has one flat price per call, whatever the size of the request: LLM completions with automatic failover across several large models, read-only EVM tooling over Base, Ethereum, Polygon, Arbitrum and Optimism, and pure crypto utilities that touch no network.","url":"https://flat-rate-llm.kikoribera03.workers.dev/v1/util/selector","method":"POST","headers":{},"bodySchema":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string","description":"Canonical signature: name(type1,type2), no spaces and no argument names."}}},"responseSchema":{"type":"object","properties":{"topic0":{"type":"string"},"selector":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_VziRxqgorV4hjgYWVq4jl","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a canonical Solidity function or event signature into its 4-byte function selector and 32-byte event topic0 hash.","exampleAgentPrompt":"What's the 4-byte function selector and event topic0 for the Solidity signature transfer(address,uint256)?","exampleUseCases":[{"title":"Building raw EVM calldata by hand","prompt":"I need to craft raw calldata for an approve call on an ERC20 — can you give me the 4-byte selector for approve(address,uint256)?"},{"title":"Filtering smart contract event logs","prompt":"I want to filter Ethereum logs for Transfer events on an ERC20 — what's the topic0 hash for Transfer(address,address,uint256)?"},{"title":"Verifying ABI selector for a custom contract","prompt":"I wrote a custom function called swapExactTokensForETH(uint256,uint256,address[],address,uint256) — what's its 4-byte selector so I can double-check my ABI encoding?"}],"resultDescription":"Returns a JSON object with two fields: 'selector' (the 4-byte hex function selector, e.g. 0xa9059cbb) and 'topic0' (the 32-byte hex keccak256 hash of the signature, used as the first topic when filtering event logs).","failureModes":["Missing or malformed 'signature' parameter returns an error — signature must be canonical (no spaces, no argument names, e.g. transfer(address,uint256))","Passing a non-canonical form such as 'transfer(address _to, uint256 _value)' may return incorrect results or an error","Network or upstream worker timeout may return a 5xx error"],"whenToPreferThis":"Use this endpoint when you need to programmatically compute EVM function selectors or event topic0 hashes without running a local Solidity compiler or ABI library. Ideal for agents building raw calldata, filtering event logs, or verifying ABI encodings on the fly. Prefer this over a full ABI-parsing library when you only need the selector or topic0 and want a stateless, pay-per-call REST call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:48:38.811Z","isFirstParty":false}