I am developing a large database of exploitable contract addresses and creating a website to host such a database for users to use to see if contracts are safe.

Is there a way to get all contract addresses from the ethereum blockchain?. Currently, I am using a web scraper, but I often get temporarily banned, even when using proxies and fake user credentials.


You can do this by querying the blockchain directly instead of using your web scraper. For this, you would need to run a node and check each block's transactions to see if the associated addresses are contracts.

  • This sounds like what I am after. I have installed geth, but do you have any resources to check a single block for such a contract address? – Daniel Connelly Aug 30 '19 at 1:08
  • There are a few ways. One is to use the eth_getTransactionReceipt RPC call that has a contractAddress field that is populated if the transaction is sent to a transaction. – Shane Fontaine Aug 30 '19 at 4:10
  • The eth_getCode call returns the code at each an address. If the address is a contract, this will return something that is non-zero – Shane Fontaine Aug 30 '19 at 4:12

By default all full nodes contain every single contract and transaction on the Ethereum network.

I don't know how you would filter only contracts though and there would also be far to many contracts to check them all.

Mabye you could make a system where a user would post about a smart contract instead of reviewing one.

  • Do you know if a fast node contains the contract address? I am not looking for the bytecode (which I read a full node contains), but only want the addresses. – Daniel Connelly Aug 30 '19 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.