I'm getting this error: "Error 3090004: Missing required authority" when I try to call contract method. Jungle testnet is used.
That is the method:
//@abi action
void add(account_name name, uint64_t owner) {
ordertable orders(_self, _self);
orders.emplace(owner, [&](auto& order) {
order.owner = owner;
});
}
Contract is compiled and deployed. I'm using that:
cleos -u https://jungle.eosio.cr:443 set contract myaccount ./ ./order.wast ./order.abi
And contract is called with that:
cleos -u https://jungle.eosio.cr:443 push action myaccount add '["myaccount","2"]' -p myaccount@active
Any ideas what might be wrong?
emplace
is the payer, while in your case is just number 2. try_self
orname
instead ofowner
as the first argument