1

I see eosflare.io can list accounts that has transactions/actions with a specific smart contract. How?

For example, here is eosflare.io's list of all DICE token holders: https://eosflare.io/token/betdicetoken/DICE

Here is the list of RIDL token holders: https://eosflare.io/token/ridlridlcoin/RIDL

They even have them ranked! Is this possible via RPC API or they are doing it by storing all the actions in a database and then producing a nice report from it?

2
  • 1
    I suppose they fetch holder stats from the token contracts, not list of accounts that have interacted with the contract.
    – Yaroslav
    Commented Jan 21, 2019 at 8:16
  • Any way to get a list of "holders" for a given smart contract?
    – Kabir
    Commented Jan 22, 2019 at 17:37

2 Answers 2

0

If the token contracts just fetch holder stats from the token, the only way reporting is possible is by keeping track of every transactions occurring related to the smart contract.

Using RPC API should be theoretically possible to keep track for blocks but Nodeos has a nicer and more realistic solution for that which is storing the blocks in MongoDB where you can look up the data much faster without passing through the network every time.

1
  • I am actually building a JSON API for all things EOS data for non-blockchain developers and yes I am going to store data in RDBMs.
    – Kabir
    Commented Jan 26, 2019 at 3:50
0

There is no way to fetch this natively from nodeos. As EOSFlare isn't open source, we can only guess at what they are doing specifically behind the scenes. However, they are likely using something similar to Hyperion, which is open source.

Here is an example of querying all the DICE related transfers from the betdicetoken contract, limited to 10 results, using the endpoint provided by EOSRIO (you may get rate limited if you hit it too hard; not sure)

  • https://eos.hyperion.eosrio.io/v2/history/get_transfers?contract=betdicetoken&symbol=DICE&limit=10

You can also enable the MongoDB plugin for nodeos like suggested above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.