M
M
mashincode2021-09-16 18:52:14
blockchain
mashincode, 2021-09-16 18:52:14

How to get a list of new smart contracts?

I'm not really into the topic of smart contracts, but my old client asked me to make a function that will notify him about new smart contracts on the ethereum network, how can I get such information using web3py or some kind of api.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Mamonov, 2021-09-26
@EvgenyMamonov

I have not yet encountered such a task, but I see that so far no one has answered at all.
I will try to help.
We can say with confidence that you need to "dig" in the direction of transaction analysis.
The transaction as a result of which the smart contract was created looks like this https :
//ropsten.etherscan.io/tx/0x5aa752d86932b36e... get information that a smart contract should be created in this transaction. Those. determine that a smart contract is created as a result of this transaction and then take its address from the To field. I know three options that can be considered to find a solution: 1)
614f96bae07ca718175271.png
614f9716b7e63008558709.png
2) https://infura.io , there, with the help of libraries from the ether github.com/ethereum/go-ethereum , I read transactions and decoded the input data. You can also sign up there.
3) you can try to put the ether node on your server and connect to it with the ether libraries instead of infura.io and analyze the logs. This option only makes sense if neither etherscan.io nor infura.io suits
you. Hope this helps you.

R
rPman, 2021-09-27
@rPman

There is an open source project https://github.com/blockchain-etl a set of utilities for analyzing blockchain transactions, most likely there is a solution

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question