I am following the example on how to use KV-Map-API from the official page, but when I call
cleos set contract ...
I get following error message:
Error 3070003: Serialization Error Processing WASM
Error Details:
env.kv_set unresolveable
pending console output:
EOS version is 2.1 and EOS.CDT is the latest one (v1.8.1). I have also tried to use normal std::map
but I can only see values during the upsert function
. When I call find function
the map is empty. Here is the example with KV MAP:
using my_map_t = eosio::kv::map<"kvmap"_n, string, string>;
my_map_t my_map{};
[[eosio::action]]
void upsertrole(const string& role, const string account_name){
my_map[role]=account_name;
};
Does anyone have any idea what I am missing?