#include <eosiolib/eosio.token.hpp> // right path to eosio.token.hpp file
void getBalance(account_name owner){
eosio::token t(N(eosio.token));
const auto sym_name = eosio::symbol_type(S(4,EOS)).name();
const auto my_balance = t.get_balance(N(owner), sym_name );
eosio::print("My balance is ", my_balance);
}
https://eosio.stackexchange.com/questions/375/how-can-i-get-my-contract-currency-balance-with-c-code?rq=1
版权属于:区块链开发网
本文链接:www.zhugexiaojue.com/index.php/archives/685.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!
,
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
喜欢就支持一下吧