loading prices...
prices by coingecko
onchain.search tools/local · 0 uploads/links/about

home / ethereum / function-selector-calculatorlocal

Function Selector and Event Topic Calculator

Get the 4-byte function selector and the full topic0 hash from a Solidity signature.

function-selector-calculatorready · runs in this browser

Runs locally in your browser. Nothing you type is sent anywhere.

ethereum tools · free · runs in your browser · no sign-up · no wallet

01 // about this tool

A function selector is the first 4 bytes of the Keccak-256 hash of the function signature. An event's topic0 is the full 32-byte hash of its signature. Both are how the EVM and indexers identify calls and logs.

02 // how to use it

  1. Type the signature with canonical types and no spaces, e.g. transfer(address,uint256).
  2. Press Run.
  3. Copy the selector for calldata or topic0 for log filters.

03 // faq

Why does uint need to be uint256?

Signatures use canonical type names. uint is an alias, so write uint256.

What is topic0?

The hash of an event signature. It is the first topic in every non-anonymous log.

04 // related tools

all 43 ethereum tools →