2

EOSIO.CDT doesn't support std::array in function argument or field of multi_index struct. You can try my customized version of cdt, eoscc which supports std::array. If you want to use official EOSIO.CDT, you had better use std::vector, but limit the number of items by yourself.


1

the problem is coming from beforeEach function => you are deploying each time a new contract and it throws, because you are creating your user only in the first test suite Solutions: Replace beforeEach with before Create a user in each of your tests


1

You can deploy only one contract per account. If you deploy new contract on your account, existing contract is removed, but its data saved via multi_index table are alive. You need to merge three contracts into one. Easiest way to do this is putting all methods of three contracts into one class. Second, you can use multiple contract classes in one wasm, ...


1

TL;DR You need to migrate all rows. Secondary indices are stored in RAM. Each row of multi_index with secondary index is stored by multiple types of chainbase objects like key_value_object (for storing data by primary key) and indexTYPE_object (for storing primary key by secondary key). This secondary index object (indexTYPE_object) only has primary key ...


1

Add struct by_keyBox; before using declaration: struct by_keyBox; using setw_multi_index = chainbase::shared_multi_index_container< s_object, indexed_by< ordered_unique<tag<by_id>, member<s_object, s_object::id_type, &s_object::id>>, ordered_unique<tag<by_keyBox>, composite_key<...


1

Do same like primary key index: void mainloan::payconfirm(uint64_t loan_id) { // assume paymade_table is instantiated through contract constructor auto pridx = paymade_table.get_index<N(loanid)>(); auto itr = pridx.find( SECONDARY_KEY_WHICH_YOU_WANT_TO_FIND ); pridx.modify(itr, same_payer, [&](auto& p) { /* updater */ }); }


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