ethereum-function-signature-registry
ethereum-function-signature-registry copied to clipboard
Watch etherscan/etherchain for new contract source submissions and feed them into 4bytes.directory
Hi @pipermerriam,
some time ago I created a script to dump contract sources from etherscan/etherchain that could be used to watch for new contract submissions in order to feed them into the 4bytes.directory, what do you think?
here's the scripts. should be easy to modify it to collect function signatures + hashes and submit them after deduping the signature_text. the repo also contains a good amount of published sources. I'll dedup the sources in that repo later but we could use that as a good starting point to submit new sigs.
cheers, tin
quickly hacked a script based on your code to create a func sig db from all contracts in the repo ==> function_signatures.json (40165 sig_hashes; 4bytes.directory currently states to have a db of 24k sig_hashes)
If you would like to submit those to the registry 👍. If you have all of the contract sources in a repo which it looks like you do, you can just use the github webhook integration (docs here https://www.4byte.directory/docs/) or the easier 4byte bot (https://walleth.org/2018/02/19/4bytebot/) and we'll just scrape the whole repo.
:) the bot appears to work. would've been a bit more efficient to submit the deduped funcsig.hashes json file but this is also fine :) I guess the bot will only take sol files from the commit and not from the whole repo so I'll either submit the rest from the funcsig json or touch everything (imperformant).
cheers
(4k new sigs already in 👍 at least 14k more to go :p)
nice, we've doubled the number of sigs in 4bytes.directory :) (~24k before, 54k now)