acuarica / evm

A Symbolic Ethereum Virtual Machine (EVM) bytecode interpreter, parser and decompiler, along with several other utils for programmatically extracting information from EVM bytecode.
https://acuarica.github.io/evm/
MIT License
46 stars 5 forks source link

Update selectors database #45

Closed acuarica closed 5 months ago

acuarica commented 11 months ago

The current selectors database https://github.com/acuarica/evm/blob/32764c3f1e5d71c9366c6bf1c20b9e26b35850b9/selectors/functionHashes.json is quite outdated. Update this database to include more function and event signatures.

From #1

The user then can check out some of these APIs to do the hash lookup.

https://www.4byte.directory/ https://www.etherface.io/ API seems to be down https://openchain.xyz/signatures https://github.com/ethereum-lists/4bytes

acuarica commented 8 months ago

A new 4byte database has been created https://github.com/acuarica/4byte from verified contracts from Etherum mainnet. This database should be imported into https://github.com/acuarica/sevm-4byte.

acuarica commented 5 months ago

Database selectors repo https://github.com/acuarica/sevm-4byte has been merged into this repo in 03d935f.

Thus, said repo has been deleted and its corresponding package https://www.npmjs.com/package/sevm-4byte has been marked as deprecated.

acuarica commented 5 months ago

OpenChain API https://openchain.xyz/signatures allows the use to export the whole signature database, using the export endpoint, e.g.,

curl https://api.openchain.xyz/signature-database/v1/export > sigdb.txt

However, its size is currently 147M, which is too big to be embedded in the local selectors database.

acuarica commented 5 months ago

The other alternative was to merge with our own 4byte database. The functions.json generator has been added here https://github.com/acuarica/4byte/commit/2732fa2b49a93eee32b6a39f3e9fbddc9ce36f95.

However, it is also too big, ~12M only the function signatures (without hashes).

So closing this, in favor of the new patch API