]> git.ardis.lu - event-hashes/summary
 
descriptionA minimal web utility to calculate the Keccak-256 hashes for all the events in a Solidity code block.
last changeSun, 11 Oct 2026 06:59:57 +0000 (23:59 -0700)
readme

event-hashes

This is a minimal web utility to calculate the keccak256 hashes of the normalized event signatures of all the events in a Solidity code block. This hash can then be used with indexers like Etherscan to search for specific logs in the EVM history.

Warning

Known limitations:

Also check out this gist to copy all the code at once from an Etherscan smart contract code page; you can then directly paste the copied code into this tool to quickly parse all the events.

Code repository mirrors: GitHub, Codeberg, git.ardis.lu

Example

Demonstration of the event-hashes web UI hashing the ERC-20 Transfer event.

Given the standard ERC-20 Transfer event:

event Transfer(address indexed _from, address indexed _to, uint256 _value)

The tool will normalize the event signature (i.e., remove spaces, input names, and extraneous keywords):

Transfer(address,address,uint256)

Then calculate the keccak256 hash of the UTF-8 encoded bytes of the normalized signature:

0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

This hash may then be used in another tool to filter a smart contract's logs, e.g. in Etherscan:

The "Events" page of a token smart contract on Etherscan, filtered to only the events matching the previously calculated Keccak-256 hash.

Features

Intelligently parse entire smart contracts

There's no need to manually extract the event signatures from the smart contract code. The tool will automatically ignore lines that don't contain event signatures.

Demonstration of the event-hashes web UI parsing an entire Solidity smart contract and ignoring lines of code that don't contain events.

Copy permalinks to code blocks

You can easily share links to events with other people. The entire codeblock is compressed and encoded into the URL fragment of the permalink and is decoded client-side (i.e., nothing is shared with a server).

For example, here's a permalink to the ERC-721 interface:

Demonstration of the event-hashes web UI showing the event hashes for the ERC-721 interface.

Useful table tools

The output is a normal, well-behaved <table> element. Accessibility and web browser functions should work as expected.

There are also utilities to download the table as a CSV file or copy it to clipboard, so you can easily export the table to a spreadsheet or other software of your choice.

An output table from event-hashes, copied into external spreadsheet software.

Delete all lines without events

There is a button to delete all lines in the input code block that do not contain event definitions. This button is useful for identifying the original event definitions in a large code block and reducing the permalink size.

Testing

Use this permalink for testing. The output should be:

15 events found (11 unique)

Event Keccak-256 Hash
Simple(address,address,uint256) 0x0c4aa1b50b54ea9174bfce3c438012e4f2bbf93a058dc8d74185ab16d82ba900
Simple(uint256[],int256,uint8[]) 0x2026044affa2e544dcb961375aedefd2b307e1b946edac0491c979b356280220
Spaces(address,address,uint256) 0xda28d9a3b64acdf2ca6024d6f102d1771bd9d91df417723b1f14c4ae0856c6d3
MultiLine(address,address,uint256) 0x760dd7228125a3ef675a431bf253d71f0e2b83af9ec42e0cfd9d2fae9752fb49
MultiLineSameName(address,address) 0xe18b9597b1182141cedf8b007cb04e23cf5a02d16c74ce2c704fb5dfd7516343
MultiLineSameName(uint256,int256) 0x06b14b8df51d75cfe7ac7998ad1c26ef4c27486f5002d2467e2153e5223afb65
Duplicate() 0x1b29ea747187d15c571dad327d15bf6195ee4e3da8d688889df1aa967bc932a6
IndexTopic(address,address,uint256) 0xb1228749f1442a6eabefa98b8b54b638ca37671df1d1c10b5e9a8f00e23a7e52
ParamComments(address,uint256,uint256) 0xafe0de50a027183426939f46db89b4603a5cb0653aae50f743d17698b0f1bfa9
StrictModeEvent1(address) 0xdc3a255e62df1a4618b1826381a9d4994f73fcfe53923f5adedc7a6c4a2b6852
StrictModeEvent2(address) 0x41a478e2922fd0901233d21296641db526d0774459d7adb8290da705389eb5af

More examples

Here are some permalinks to common interfaces:

shortlog
7 days ago Ardis LuBump noble-hashes to 2.4.0 main
11 days ago Ardis LuImprove selection color contrast
2026-10-02 Ardis LuImplement dark mode
2026-07-28 Ardis LuRemove unnecessary <br>
2026-07-03 Ardis LuRefactor to delete `try..catch` blocks
2026-06-25 Ardis LuRefresh fonts
2026-06-25 Ardis LuOptimize image size
2026-04-10 Ardis LuUpdate gist for new Etherscan code editor
2026-03-17 Ardis LuRefactor to use `Response.bytes()`, `Uint8Array.toBase6...
2025-12-03 Ardis LuAdd code repository mirrors
2025-12-02 Ardis LuAdd MIT license
2025-06-12 Ardis LuFix bug where multiline comments were sometimes not...
2025-06-06 Ardis LuDo not show copy-permalink button if there is no text...
2025-06-06 Ardis LuFix bug where clear-code button does not disappear...
2025-06-06 Ardis LuOptimize images
2025-05-13 Ardis LuFix event count
...
heads
7 days ago main
This page took 0.051051 seconds and 7 git commands to generate.