You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
I called eosio::token transfer action in contractA's method "method1" as rex's deposit action like this:
but why I encountered this error as follows, it seems checking authorizaions cannot find provided_permissions and provided_keys.
cleos push action user1 method1 ‘[“user1”,”user2","1.00000000 TBC”,”send TBC”]’ -p
user1@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 '${auth}', but does not have signatures for it under a provided
delay of 0 ms, provided permissions ${provided_permissions}, provided keys
${provided_keys}, and a delay max limit of 3888000000 ms
my code:
#include <eosio.system/eosio.system.hpp>
#include <eosio.token/eosio.token.hpp>
using eosio::token;
using eosiosystem::system_contract;
void contractA::method1(const name &from,
const name &to,
const asset &quantity,
const string &memo) {
check(from != to, "cannot transfer to self");
require_auth(from);
check(is_account(to), "to account does not exist");
auto sym = quantity.symbol.code();
symbol fee_sym = st.supply.symbol;
int64_t amount = st.fee;
asset fee = asset(amount, fee_sym);
auto payer = has_auth(to) ? to : from;
token::transfer_action transfer_act{
system_contract::token_account,
{ payer, system_contract::active_permission }
};
transfer_act.send( payer, to, fee, "fee");
}
The text was updated successfully, but these errors were encountered:
I called eosio::token transfer action in contractA's method "method1" as rex's deposit action like this:
but why I encountered this error as follows, it seems checking authorizaions cannot find provided_permissions and provided_keys.
my code:
The text was updated successfully, but these errors were encountered: