c++错误:(eosio contract):分解为2个元素,但只提供了1个名称



我在编译合同时遇到这个错误。

指定代码:

basic::tradeparams basic::get_defi_trade_data(asset tokens, symbol to){
sx::registry::defibox_table defi_table( "registry.sx"_n, "registry.sx"_n.value );
auto rowit = defi_table.find(tokens.symbol.code().raw());
if(rowit==defi_table.end()) return {};
name tcontract = rowit->base.get_contract();
string pair_id;
for(auto& p: rowit->quotes){
if(p.first.get_symbol()==to){
pair_id = p.second; break;
}                                                         }                                                           if(pair_id=="") return {};
// get reserves                                             const auto [ reserve_in, reserve_out ] = defibox::get_reserves( stoi(pair_id), tokens.symbol );
const uint8_t fee = defibox::get_fee();

尝试使用EOSLIB_SERIALIZE显式定义表的字段。

关于这个宏的文档页。

相关内容