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

Without knowing the exact game logic I can't really answer your question but the following should at least show you how to nest objects. struct [[eosio::table]] user_t { struct card_skin_t { eosio::name name; uint8_t owned; } struct card_t { eosio::name card_name; eosio::name ...


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

You can use the available_primary_key() function that belongs to multi index arrays: a.id = names.available_primary_key() This gets an incrementally larger primary key than the previous highest key


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