#ethereum #etk

bin+lib fuel-etk-4byte

EVM Toolkit function selector database

2 releases

0.3.1-dev Feb 1, 2023
0.3.0-dev Jan 27, 2023

#9 in #etk

Download history 214/week @ 2025-10-15 251/week @ 2025-10-22 915/week @ 2025-10-29 502/week @ 2025-11-05 368/week @ 2025-11-12 1006/week @ 2025-11-19 892/week @ 2025-11-26 455/week @ 2025-12-03 135/week @ 2025-12-10 52/week @ 2025-12-17 43/week @ 2025-12-24 65/week @ 2025-12-31 21/week @ 2026-01-07 23/week @ 2026-01-14 69/week @ 2026-01-21 363/week @ 2026-01-28

492 downloads per month
Used in 3 crates (via fuel-etk-dasm)

MIT/Apache

10MB
115 lines

EVM Toolkit Function Selector Database.

To roughly quote 4byte.directory:

Function calls in the Ethereum Virtual Machine are specified by the first four bytes of data sent with a transaction. These function selectors are defined as the first four bytes of the Keccak-256 hash of the canonical representation of the function signature. Since this is a one-way operation, it is not possible to derive the human-readable representation of the function (signature) from the four byte selector. This database is meant to allow mapping those bytes signatures back to their human-readable versions.


etk-4byte

Ethereum function selector reverse lookup database, populated from 4byte.directory.

Updating the Database

Since etk-4byte is a purely offline database, it needs regular updates. To fetch the latest database and convert it to the expected format, run:

$ cargo run --features=generate --bin etk-4byte-generate > src/signatures.txt
$ cargo run --features=generate --bin etk-4byte-pack

Then recompile.

Dependencies

~7–22MB
~408K SLoC