Ethereum Event Topic Calculator
Compute topics[0] — the Keccak-256 hash of the canonical event signature — for any Solidity event. Paste a declaration or a bare signature, or batch-convert a list.
Event Topic (topic0) Calculator
Compute the 32-byte event topic — the Keccak-256 hash of the canonical event signature — used astopics[0] in every non-anonymous Solidity event log.
topics[0] — event signature hash
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efBulk mode — one signature per line
Common event topics
| Signature | Standard | topic0 |
|---|---|---|
| Transfer(address,address,uint256) | ERC-20 & ERC-721 | 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef |
| Approval(address,address,uint256) | ERC-20 & ERC-721 | 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925 |
| ApprovalForAll(address,address,bool) | ERC-721 & ERC-1155 | 0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31 |
| TransferSingle(address,address,address,uint256,uint256) | ERC-1155 | 0xc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62 |
| TransferBatch(address,address,address,uint256[],uint256[]) | ERC-1155 | 0x4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb |
| URI(string,uint256) | ERC-1155 | 0x6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b |
| Deposit(address,address,uint256,uint256) | ERC-4626 vault | 0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7 |
| Withdraw(address,address,address,uint256,uint256) | ERC-4626 vault | 0xfbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db |
| Deposit(address,uint256) | WETH | 0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c |
| Withdrawal(address,uint256) | WETH | 0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65 |
| OwnershipTransferred(address,address) | Ownable | 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0 |
| Paused(address) | Pausable | 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258 |
| Unpaused(address) | Pausable | 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa |
| Upgraded(address) | UUPS proxy | 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b |
| AdminChanged(address,address) | Transparent proxy | 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f |
| BeaconUpgraded(address) | Beacon proxy | 0x1cf3b03a6cf19fa2baba4df148e9dcabedea7f8a5c07840e207e5c089be95d3e |
| Initialized(uint64) | Initializable | 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2 |
| Initialized(uint8) | Initializable (legacy) | 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498 |
| RoleGranted(bytes32,address,address) | AccessControl | 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d |
| RoleRevoked(bytes32,address,address) | AccessControl | 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b |
| RoleAdminChanged(bytes32,bytes32,bytes32) | AccessControl | 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff |
| Swap(address,uint256,uint256,uint256,uint256,address) | Uniswap V2 pair | 0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822 |
| Mint(address,uint256,uint256) | Uniswap V2 pair | 0x4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f |
| Burn(address,uint256,uint256,address) | Uniswap V2 pair | 0xdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496 |
| Sync(uint112,uint112) | Uniswap V2 pair | 0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1 |
| Swap(address,address,int256,int256,uint160,uint128,int24) | Uniswap V3 pool | 0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67 |
| Mint(address,address,int24,int24,uint128,uint256,uint256) | Uniswap V3 pool | 0x7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde |
| Burn(address,int24,int24,uint128,uint256,uint256) | Uniswap V3 pool | 0x0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c |
What is an event topic?
Every non-anonymous Solidity event emits a log whose topics[0] is the Keccak-256 hash of the event's canonical signature — e.g. Transfer(address,address,uint256) hashes to 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef, the signature every ERC-20 transfer carries.
This tool normalizes real declarations before hashing: the event keyword, indexed markers, and parameter names are stripped automatically, so pasting an event line straight from a contract produces the correct topic.
Features
- Accepts canonical signatures and full event declarations (event, indexed, parameter names, tuple types)
- Bulk mode — paste one signature per line, get every topic0 at once
- Reference table of common event topics: ERC-20/721/1155/4626, OpenZeppelin, proxy standards, Uniswap V2/V3, WETH
- Instant output — matches Solidity, ethers.js, web3.js, and Foundry results
- No data sent to any server — safe for unpublished ABIs
When to use it
Use it when filtering logs with eth_getLogs or ethers.js topic filters, decoding indexed event parameters, matching log topics in a block explorer, computing the event signature for a custom event, or verifying the topic hash a web3 library produces. Note that anonymous events carry no signature topic, and indexed arguments occupy topics 1–3 as ABI-encoded values — only topics[0] is a signature hash.
Frequently asked questions
What is topic0 in an Ethereum event log?
topics[0] is the Keccak-256 hash of the event's canonical signature — e.g. Transfer(address,address,uint256) → 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. Every non-anonymous event includes it so indexers can identify the event type before decoding any data.
How do I filter logs by event in eth_getLogs?
Put the computed topic into the topics array: { topics: ["0xddf252ad…"] } filters for Transfer events. topics[1] and topics[2] filter indexed arguments — pad addresses to 32 bytes (0x + 24 zeros + address).
Does the event keyword or "indexed" affect the hash?
No — only the canonical signature (name + comma-separated types) is hashed. indexed markers, parameter names, the event keyword, and the trailing semicolon are stripped before hashing; this tool normalizes them automatically.
What about anonymous events?
Anonymous events emit no signature topic — their logs contain only the indexed argument topics (1–4 of them). If you cannot find an event in the topics table, the contract may have declared it anonymous.
How are tuples hashed in event signatures?
A tuple parameter is hashed as its member types in parentheses — Foo((uint256,address),uint256) → keccak256("Foo((uint256,address),uint256)"). Dynamic arrays of tuples follow the same rule with [] appended.
Is my input sent anywhere?
No — every hash is computed locally in your browser via Keccak-256. Nothing is uploaded, logged, or stored.
