Crate etk_4byte

source ·
Expand description

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.

Functions

  • Attempt to retrieve the human-readable signature given a selector.