1

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.

2 Answers 2

3

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.

3
  • 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? Commented Aug 30, 2019 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. Commented Aug 30, 2019 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 Commented Aug 30, 2019 at 4:12
1

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.

1
  • 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. Commented Aug 30, 2019 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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