EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

How to iterate all token holders #5794

Closed chuang39 closed 6 years ago

chuang39 commented 6 years ago

For the contract like contracts/eosio.token, account is sharded and recorded by using user's name as scope. If I would like to find all holders for the token, how to iterate through accounts or how to iterate difference scopes? Thanks a lot!

Link for the contract eosio.token. https://github.com/EOSIO/eos/tree/master/contracts/eosio.token

csquan commented 6 years ago

how?same problem?

taokayan commented 6 years ago

Yes, please upgrade to the latest version first. you can use "cleos get scope" with lower bound to iterator all possible scope inside a contract. Please quote the account name with a space as prefix, like: ./cleos get scope eosio.token -L " 555555555555"

taokayan commented 6 years ago

solved in https://github.com/EOSIO/eos/pull/5486

mschoenebeck commented 3 years ago

in the current version of eosio (2.1.0-1) cleos get scope is not available anymore. How to get all scopes/shards of a table?