简体   繁体   English

在给定的时间戳获取所有持有 ERC20 代币的地址

[英]Fetch all addresses holding an ERC20 token at a given timestamp

I am trying to figure out how to do the following [in Python]:我试图弄清楚如何[在 Python 中] 执行以下操作:

  • Fetch the address of all wallets holding a given ERC20 before a given date.获取在给定日期之前持有给定 ERC20 的所有钱包的地址。

EG: 'Get holdingAddresses from contractAddress before timestamp' EG:'在时间戳之前从 contractAddress 获取 holdingAddresses'

I've looked at both the Ethplorer and Etherscan API's and I cannot figure out a way to retrieve this data.我查看了 Ethplorer 和 Etherscan API,但无法找到检索这些数据的方法。

I think the answer may be through Infura, but I'm at a loss on where to start there if that is indeed the solution.我认为答案可能是通过 Infura,但如果这确实是解决方案,我不知道从哪里开始。

Anyone know if this can be done, and if so - how?!任何人都知道这是否可以做到,如果可以 - 怎么做?!

Here is an example how to get all token transfers with web3.py .这是一个如何使用 web3.py 获取所有令牌传输的示例

You store the data locally, like in an SQL database.您将数据存储在本地,例如 SQL 数据库中。 You can construct the list token holdings at a point of time, based on the transfers that happened before the block number of the timestamp.您可以根据时间戳的块号之前发生的转移,在某个时间点构建列表令牌持有量。 You just have a maximum block number and do not query any Transfer events after that block number.您只有一个最大块号,并且在该块号之后不查询任何Transfer事件。

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

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