简体   繁体   English

如何在 BSC 上获取合约的所有持有者

[英]How to get contract's all holders on BSC

How do I get contract's all holders with balances on BSC network?如何让合约的所有持有人在 BSC 网络上有余额?

  • From bscsan.com you can export only top holders in CSV format从 bscsan.com 您只能以 CSV 格式导出顶级持有人
  • From bitquery there's no ready method for holders.从 bitquery 来看,持有者没有现成的方法。 There's transfers, senders, receivers etc.. I guess you could solve the holders list somehow from this data but didn't find any example有转账、发件人、收件人等。我想你可以从这些数据中以某种方式解决持有人名单,但没有找到任何例子
  • CovalentHQ's API has a method for this, but unfortunately it's giving timeout error if the holders list for the contract is huge (like SafeMoon with >1.7M holders). CovalentHQ 的 API 有一个方法可以解决这个问题,但不幸的是,如果合约的持有者列表很大(比如拥有超过 170 万持有者的 SafeMoon),它会给出超时错误。 I asked their support for solution, but I guess they gave up because they stopped responding我向他们寻求解决方案的支持,但我猜他们放弃了,因为他们停止了回应
  • My latest plan was to use ethereum-etl.我最近的计划是使用 ethereum-etl。 This was showing promise and found an article about it .这是显示 promise 并找到了一篇关于它的文章 It seems I need to get traces and transactions to be able to query for balances.看来我需要获取跟踪和交易才能查询余额。 But when I tried to load the traces:但是当我尝试加载跟踪时:
ethereumetl export_traces --start-block 0 --end-block 500000 --provider-uri https://bsc-dataseed1.ninicoin.io --batch-size 100 --output traces.csv

I get following error message:我收到以下错误消息:

ValueError: {'code': -32601, 'message': 'the method trace_block does not exist/is not available'}

This made me think that maybe the tool does not support BSC.这让我觉得该工具可能不支持 BSC。

So any ideas?那么有什么想法吗? Have been banging my head to the wall for couple days now.几天来一直把我的头撞到墙上。

CovalentHQ's API has paging built into it. CovalentHQ 的 API 内置了分页功能。 You could call it for each page of 1000 results and append each page to a file using python.您可以使用 python 将每页的 1000 个结果和 append 调用到文件中。

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

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