Hello guys i am trying to build a contract that act with eosio.token to make a transfer from my contract using inline action with the eosio.token contract here my code
#include <eosio/eosio.hpp>
#include <eosio.token/eosio.token.hpp>
using namespace std;
using namespace eosio;
class [[eosio::contract("test")]] test:public eosio::contract{
private:
void make_transfer(name& from,name& to,asset& quantity,string& memo)
{
token::transfer_action transfer{"eosio.token"_n, {from, "active"_n}};
transfer.send(from,to,quantity, memo);
}
public:
test(name receiver,name code,datastream <const char*> ds):contract(receiver,code,ds){}
[[eosio::action]]
void trade(name from,name to ,asset fromcoin,asset tocoin,string memo)
{
make_transfer(from,to,fromcoin,memo);
}
};
i got these error
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":"alice","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [{"actor":"test","permission":"eosio.code"}], provided keys [], and a delay max limit of 3888000000 ms
pending console output: