eosjs icon indicating copy to clipboard operation
eosjs copied to clipboard

How to get total supply for "eosio.token" contract?

Open epochchaser opened this issue 8 years ago • 3 comments

Hello. When i try to fetch something with eos.contract(contractName) API, i could get this types of result. => {abi: {…}, schema: {…}, structs: {…}, types: {…}, fromBuffer: ƒ, …} but there is no info about supply.

can you please give me some information about it?

epochchaser avatar Jul 15 '18 18:07 epochchaser

$ cleos -u https://mainnet.eoscanada.com get table eosio.token EOS stat
{
  "rows": [{
      "supply": "1004320865.0254 EOS",
      "max_supply": "10000000000.0000 EOS",
      "issuer": "eosio"
    }
  ],
  "more": false
}

jcalfee avatar Jul 16 '18 20:07 jcalfee

The supply was set after deployment and is stored in a table.

jcalfee avatar Jul 16 '18 20:07 jcalfee

thanks for help!! i solved it with currencystat!

epochchaser avatar Jul 17 '18 14:07 epochchaser