edenia / eden-spend-explorer

Expense Tracking Standard for Eden Communities :bank:
https://spending.eden.eoscommunity.org
Apache License 2.0
1 stars 1 forks source link

Eden Treasury Balance #71

Closed xavier506 closed 2 years ago

xavier506 commented 2 years ago

Show eden treasury balance in EOS and USD

image
xavier506 commented 2 years ago
const fetch = require('node-fetch');
const { JsonRpc } = require('eosjs');

// Instantiate a new JsonRpc object, with the Network Api Uri, and a request object
const rpc = new JsonRpc('https://eos.edenia.cloud', { fetch });
// Request the balance, passing in the token contract, the account name, and the token symbol
rpc.get_currency_balance('eosio.token', 'genesis.eden', 'EOS').then((balance) => console.log(balance));