Solidity function selector: Keccak-256, 4-byte selector and event topic from a signature
solidity_function_selectorSolidity 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. Price: $0.05 per successful call, paid over x402 (USDC on Base).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Alternative to signature: raw data to Keccak-256 hash. Accepted: at most 8192 characters. | |
| kind | No | function (default), event or error. Accepted: function, event, error. | |
| encoding | No | Encoding of data: utf8 (default) or hex. Accepted: utf8, hex. | |
| signature | No | Solidity function, event or error signature, e.g. transfer(address to, uint amount). Accepted: at most 1024 characters. |