2

You set get_first_receiver() as the scope of member_index. If this action is not sent by other contract, first_receiver will be the account where the contract is deployed. [[eosio::action]] void upsert(name user, std::string first_name, std::string last_name, std::string contact, std::string address) { require_auth( user ); // 2nd argument here is the ...


2

This error is usually caused by having a table that contains data in a specific format and then updating the ABI after the fact to change the data types or structures. The ABI file now thinks that all the data in the table is in the new format, but it isn't, and therefore the amount of bytes it tries to read for each of the field entries is no longer correct....


2

I resolved the issue by moving the vectors into separate objects, then referencing those objects in the table definition: struct teststruct{ name compname; std:vector<anotherstruct> structs; EOSLIB_SERIALIZE(teststruct, (compname)(structs)) } struct [[eosio::table]] testtable{ name owner; teststruct tststr; auto primary_key() const {...


1

lower_bound and upper_bound set the range of primary key of items you want to retrieve. If you want to get first 10 items, then call get_table_rows by lower_bound and upper_bound with the value "", and it will return "next_key" in the result. Then pass the value of "next_key" to lower_bound (or if you want to call with "...


1

If your multi_index table has multiple indices by using indexed_by, additional index will be shown like ORIGINAL_TABLE_NAME........1. The last character will use remaining last 4 bits in eosio::name. This is why additional indices can exist up to 16. (4 bits, 0 - 15 will be translated into ., 1-5, a-j) If you show the struct declarations and typedefs of ...


1

I'm unaware of a way to not return certain rows, however I believe you can achieve similar results with something like this: uint64_t get_secondary_1() const { return result == "pass";} This will return your data with all the students who passed first, followed by those who didn't. So once you see the first failer, you can stop reading from the table.


Only top voted, non community-wiki answers of a minimum length are eligible