EOS合约内查询代币余额
#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);
}
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »