Thank you very much for advice and link.
I made everything like is shown there, but when Iām trying to push withdraw action, Iām receiving the same error.
My EOSIO.token account permissions are as follow:
Bonis-MacBook-Air:eosio.msig boniradev$ cleos get account eosio.token
created: 2021-08-20T13:39:36.500
permissions:
owner 1: 1 EOS7R8AgiY9Kp44JSDq8CGpMXgPyPgQSmoSCe5wsEy1zRWwnrW8Ak
active 1: 1 EOS7R8AgiY9Kp44JSDq8CGpMXgPyPgQSmoSCe5wsEy1zRWwnrW8Ak
boni 1: 1 [email protected]
ira 1: 1 [email protected]
memory:
quota: unlimited used: 481.5 KiB
net bandwidth:
used: unlimited
available: unlimited
limit: unlimited
cpu bandwidth:
used: unlimited
available: unlimited
limit: unlimited
and when I push my action, Iām receiving following error:
Bonis-MacBook-Air:testtoken boniradev$ cleos push action boni withdraw ā[ āboniā, āiraā, ā15.00 TESTCNā, āwithdrawā ]ā -p boni@active
Error 3090003: Provided keys, permissions, and delays do not satisfy declared authorizations
Ensure that you have the related private keys inside your wallet and your wallet is unlocked.
Error Details:
transaction declares authority ā{āactorā:āiraā,āpermissionā:āactiveā}ā, but does not have signatures for it under a provided delay of 0 ms, provided permissions [{āactorā:āboniā,āpermissionā:āeosio.codeā}], provided keys [], and a delay max limit of 3888000000 ms
My withdraw action code is as follow:
ACTION withdraw (name from, name to, eosio::asset quantity, string memo) {
accountst accTable(get_self(), get_self().value);
auto itr = accTable.find(to.value);
if (itr == accTable.end()) {
print ("There is'n such deposti!");
} else {
print("trace: ", get_self());
action (
permission_level{get_self(), "active"_n},
"eosio.token"_n,
"transfer"_n,
std::make_tuple(from, to, quantity, std::string(memo))
).send();
accTable.modify(itr, get_self(), [&](auto& new_row){
new_row.total -= quantity.amount / 100;
});
// using send = action_wrapper<"withdraw"_n, &testtoken::withdraw>;
// send {"testtoken"_n, {get_self(), "active"_n}}.send(from, to, quantity, memo);
}
}
I still am making something wrong ā¦