2

How would I get a list of addresses of the newest smart contracts deployed to the ethereum blockchain? I would like to use web3.py if possible or a free api solution. I need the contract address and the time of deployment in the returned results. If possible I would like a solution that is cross chain compatible. Thanks in advance.

2 Answers2

1

get a list of addresses of the newest smart contracts deployed to the ethereum blockchain

Ethereum nodes do not index this information in their internal database, so you cannot query directly.

You can do this by walking through the transactions of each new block, then picking up transactions that contract deployment transactions (sent to 0x0000... address).

Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
  • Could you please elaborate a little. What exactly would I be searching for. – Wesley Jones Nov 09 '22 at 22:16
  • Ethereum "To" address is 0x0 if the transaction is smart contract deployment. – Mikko Ohtamaa Nov 09 '22 at 22:52
  • Are over 95% of transactions sent to 0x0 smart contracts or only some of them? I need a high degree of accuracy of at least 95%. How can I test if a transaction is a smart contract for certain? Is there a magic bit or something? – Wesley Jones Nov 09 '22 at 22:54
  • You can read the Ethereum yellow paper spec to confirm, but I AFAIK they are. Of course, if the transaction is with invalid payload the result may not be a valid contract or deployment, but this should be less than 0.000001% of txs. – Mikko Ohtamaa Nov 09 '22 at 22:56
0

You can do this by scanning the meme pool of uniswap for newly created pairs. In the case of new tokens smart-contract, you can watch for when liquidity is added to these projects.

Henry Tirla
  • 69
  • 1
  • 8