1

How do I query an EOSIO system contract table ?

As a learning challenge, I am trying to figure out how to calculate the amount of EOS votes cast and aggregate attributes of vote.

Can I use eosjs to do this ?

I can't figure out where all this information is documented. EOS dev portal seems to be missing this information all together.

Thanks in advance.

2

System tables are not (yet) well documented. You have to browse the source code.

E.g. for voters you will find table eosio voters here: https://github.com/EOSIO/eos/blob/905e7c85714aee4286fa180ce946f15ceb4ce73c/contracts/eosio.system/eosio.system.hpp#L115

cleos -u https://eu.eosdac.io get table eosio eosio voters will return the first rows.

| improve this answer | |
1

You have two options two read any table (whether system table or table of another contract) by connecting to a public node:

| improve this answer | |
  • Sure, this is well mentioned in EOS dev portal. But what I am looking for is information about what tables exists, and how to find the correct source (table) for a piece of information like voters. – Nishant Oct 28 '18 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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