简体   繁体   English

如何使用 web3.py 查询区块链以获取最新的智能合约部署?

[英]How to query blockchain for latest smart contract deployments with web3.py?

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.如果可能,我想使用 web3.py 或免费的 api 解决方案。 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.提前致谢。

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).您可以通过遍历每个新块的交易,然后选择合同部署交易(发送到 0x0000... 地址)的交易来做到这一点。

You can do this by scanning the meme pool of uniswap for newly created pairs.您可以通过扫描 uniswap 的模因池以查找新创建的对来执行此操作。 In the case of new tokens smart-contract, you can watch for when liquidity is added to these projects.在新代币智能合约的情况下,您可以观察何时向这些项目添加流动性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM