Is there a way to access the balance(of EOS or any token for that matter) of a given account using smart contract in the new CDT?
Thank you
EOS.IO Stack Exchange is a question and answer site for users and developers of distributed applications built on top of the blockchain operating system, EOS.IO. It only takes a minute to sign up.
Sign up to join this communityIn latest token contracts to get balance you need to use a static function:
auto balance = eosio::token::get_balance(token_contract, token_holder_name, symbol_code);
try this command to get balance through cleos tool cleos get table eosio.token user accounts
as shown in this snippet you can use your contract name instead of eosio.token and use user's account by replacing user in snippet to get your token balance.