eos icon indicating copy to clipboard operation
eos copied to clipboard

How can I get my contract currency balance with c++ code?

Open yang24201 opened this issue 8 years ago • 3 comments

I want to get my contract currency balance within my contract code, but the eosio::account::get (account_balance &acnt) cann't use, so how can I do that?

yang24201 avatar May 18 '18 07:05 yang24201

Also need to get the other user's account balance.

It can get by "cleos get currency balance eosio.token XXX" by command. But do not find a way in contract.

wsdfz avatar May 29 '18 07:05 wsdfz

Please refer to the system contract eosio.token.cpp & eosio.token.hpp to get the currency balance table

taokayan avatar Jun 20 '18 10:06 taokayan

We haven't received any update for this. If you still have the problem and wish to discuss further, please post it in https://eosio.stackexchange.com

taokayan avatar Oct 30 '18 06:10 taokayan