0

我有这个测试表,其中包含https://github.com/EOSIO/eos/blob/de78b49b5765c88f4e005046d1489c3905985b94/libraries/chain/abi_serializer.cpp#L89中描述的所有类型

TABLE messages {
  name    user;
  string  text;
  bool b;
  int8_t i8;
  uint8_t ui8;
  int16_t i16;
  int32_t i32;
  uint32_t u32;
  int64_t i64;
  uint64_t ui64;
  int128_t i128;
  uint128_t ui128;
  fc::signed_int var32;
  fc::unsigned_int varu32;
  float f32;
  double f64;
  float128_t f128;
  time_point tp;
  time_point_sec tps;
  block_timestamp_type btt;
  bytes bb;
  string s;
  checksum160_type cs160;
  checksum256_type cs256;
  checksum512_type cs512;
  public_key_type pkey;
  signature_type sig;
  symbol symb;
  symbol_code symb_code;
  asset ass;
  extended_asset extended_ass;

  auto primary_key() const { return user.value; }
};

类型有多个错误:

fc: use of undeclared identifier
float128_t: unknown type name error
bytes: unknown type name error
checksum160_type: unknown type name error
checksum256_type: unknown type name error
checksum512_type: unknown type name error
public_key_type: unknown type name error
signature_type: unknown type name error
symbol: unknown type name error
symbol_code: unknown type name error
asset: unknown type name error
extended_asset: unknown type name error

如何使用这些类型?PS 我刚刚将此类型添加到 EOS Studio 中默认生成的消息示例中,我的包含/使用:

#include <eosio/eosio.hpp>

using namespace std;
using namespace eosio;
4

0 回答 0