eos
eos copied to clipboard
can not get table abi
eosiocpp -g mytoken.abi mytoken.cpp
false: Unable to guess index type
{}
thread-0 abi_generator.cpp:348 guess_index_type
{"type_name":"account"}
thread-0 abi_generator.cpp:273 handle_decl
{}
You should use the command like this:
$ eosiocpp -g ${contract}.abi ${contract}.hpp
--> eosiocpp -g mytoken.abi mytoken.hpp
refer link: https://github.com/EOSIO/eos/wiki/Smart-Contract#abi
I add a field named "id" to my struct, and my problem is fixed
// @abi table
struct acct {
uint64_t id;
asset balance;
uint64_t frozen = 0;
uint64_t whitelist = 1;
uint64_t primary_key() const {
return id;
}
};
My problem has been solved in this way
Please make sure your primary_key member is of type uint64_t and is the first member in the struct.
i meet the same problem