I’m trying to achieve something quite simple. I try to call eosio.token transfer from one of my smartContract (lomtaxjungle dopurchase), but after severals days i still don’t manage to do it. From what i understand this is a permission issue, so i added the [email protected] to lomtaxjungle active public key. But still when i try to transfer EOS from one account to another with the dopurchase action it returns :
Error 3090003:
unsatisfied_authorization
Provided keys, permissions, and delays do not satisfy declared authorizations
So I think there is still something I don’t understand but I can’t figuring out what!
Here is my smart contract code :
ACTION purchase::dopurchase(name from, name to, asset quantity, string memo)
{
require_auth(from);
action
{
permission_level{from, "active"_n},
"eosio.token"_n,
"transfer"_n,
std::make_tuple(from, to, quantity, memo)
}.send();
}
EOSIO_DISPATCH(purchase, (dopurchase))
My lomtaxjungle permissions: https://jungle.bloks.io/account/lomtaxjungle#keys
And my c# call to my contract:
string result = "";
result = await esoManager.CreateTransaction(new Transaction()
{
actions = new List<EosSharp.Core.Api.v1.Action>()
{
new EosSharp.Core.Api.v1.Action()
{
account = "lomtaxjungle",
authorization = new List<PermissionLevel>()
{
new PermissionLevel() {actor = accountLoged.AccountName, permission = accountLoged.Authority },
},
name = "dopurchase",
data = new Dictionary<string, string>()
{
{ "from", accountLoged.AccountName },
{ "to", to },
{ "quantity", "0.0001 EOS" },
{ "memo", "you transefered 0.0001 EOS to " + to }
}
}
}
});
Thank you all.