{"uid":"cap_bTposR3Fy0gdm43-OmkxU","slug":"web3-tools-solidity-function-selector-event-topic0-computer-c16c9daa","name":"Web3 Tools – Solidity Function Selector & Event Topic0 Computer","description":"Compute the 4-byte function selector and event topic0 from a Solidity signature such as transfer(address,uint256).","url":"https://web3-tools.x402tookit.com/function-selector?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["signature"],"properties":{"signature":{"type":"string","description":"Canonical signature: name(type,type), no spaces or parameter names"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"name":{"type":["null","string"]},"source":{"type":["null","string"]},"topic0":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"selector":{"type":["null","string"]},"warnings":{"type":["array","null"]},"paramList":{"type":["null","string"]},"signature":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_fh4v3FGOMU5sgwUov8OFJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the 4-byte function selector and 32-byte event topic0 from a canonical Solidity signature string","exampleAgentPrompt":"What is the 4-byte function selector and event topic0 for the Solidity signature transfer(address,uint256)?","exampleUseCases":[{"title":"Decode unknown EVM calldata","prompt":"I'm seeing transactions calling an unknown contract and the first 4 bytes are 0xa9059cbb — can you tell me which Solidity function that selector corresponds to by computing it from transfer(address,uint256)?"},{"title":"Build smart contract event filter","prompt":"I need to set up a log filter for the Transfer(address,address,uint256) event — what is its topic0 hash so I can use it in an eth_getLogs call?"},{"title":"Verify ABI selector before deployment","prompt":"Before I deploy my contract, can you confirm that the function selector for approve(address,uint256) is 0x095ea7b3 so I know my ABI encoding is correct?"}],"resultDescription":"Returns a JSON object containing the 4-byte hex function selector, the 32-byte event topic0 hash, the canonical signature string, parameter list, a human-readable name, source attribution, optional warnings or reasons, and a disclaimer field.","failureModes":["Missing or malformed 'signature' query parameter returns an error","Non-canonical signature with spaces or parameter names may produce incorrect or rejected results","Unsupported or invalid Solidity types in the signature may cause computation failure","Network or payment (x402) errors may prevent the call from completing"],"whenToPreferThis":"Choose this endpoint when you need to deterministically compute the EVM function selector or event topic0 from a raw Solidity ABI signature string — particularly useful for calldata decoding, event log filtering, ABI verification, or smart contract interaction where you need to confirm the 4-byte method ID without running a local Ethereum toolchain.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-21T12:39:23.610Z","isFirstParty":false,"canonicalSlug":"web3-tools-solidity-function-selector-event-topic0-computer-c16c9daa"}