Ethereum Asked by Chris Russo on October 13, 2020
This question have just been published in StackOverflow as well, but you might be able to guide me on a better direction:
I’m looking for the most valid path to download and keep downloading every single smart contract on the ethereum network.
As I’ve been programming for a few years, I’ve been thinking about using cURL to make this. But I’m aware this is probably very outdated as it should be possible to be done somehow using the blockchain…
I’m willing to store all the contracts in a traditional MySQL database, in order to run multiple security audits on them. Is there any other database engine compatible with PHP that you would recommend to store them?
How would you approach this?
If you need a custom solution, firstly know that what is stored on the blockchain is the compiled version of the contracts, i.e., the bytecode. You can decompile it with certain tools, but obviously it won't yield the original result.
However, there are many contracts in Etherscan whose source code is published, like this one. You can get the full list of verified contracts as a CSV file, and using Etherscan's API you can make a simple script to parse that file and download all source codes.
Once you have them, you can store everything in whatever database you want, of course including MySQL.
Answered by Molina on October 13, 2020
So far the best approach I've found is to run a fully synchronised node, and then somehow extract all information into bigQuery or something alike... but it seems a little bit hard to accomplish. Any ideas?
Answered by Chris Russo on October 13, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP