2

I created a token "ABC" from account "tokenabc" and deployed a airdrop contract "airdroptoken".

And I hope that everyone who transfers EOS token to this contract will get some airdrop token "ABC".

So here is my code:

asset sendAmout = asset(quantity.amount * 10, ABC_SYMBOL);
action(permission_level{get_self(), "active"_n},
               "tokenabc"_n,
               "issue"_n,
               make_tuple(to, sendAmout, std::string("suprise")))
       .send();

But it brings an error that tells me: wrong permission.

So how to handle this kind of problem?

1

use

SEND_INLINE_ACTION(*this, issue, {{get_self(), "active"_n}},
                       {to, sendAmout, std::string("suprise"})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.