I am trying to transfer some tokens as part of my contract action, but I get an error:

ACTION maincontract::sendtoken(const name sender, const name receiver) {
    permission_level{ get_self(), "active"_n },
      std::make_tuple(sender, receiver, "120000 MYTOKEN", "memo")

the error I get in EOS Studio is:

assertion failure with message: read
  "code": 500,
  "message": "Internal Service Error",
  "error": {
    "code": 3050003,
    "name": "eosio_assert_message_exception",
    "what": "eosio_assert_message assertion failure",
    "details": [
        "message": "assertion failure with message: read",
        "file": "wasm_interface.cpp",
        "line_number": 1075,
        "method": "eosio_assert"
        "message": "pending console output: ",
        "file": "apply_context.cpp",
        "line_number": 113,
        "method": "exec_one"

UPDATE: it seems that the contract cannot transfer money on behalf of the user. I cannot expect all the users to give permission to the contract. So, how can I resolve this?

2 Answers 2


how did you create the MYTOKEN token? can you please explain the procedure you used to create this token?

  • you can use the steps here: developers.eos.io/manuals/eosio.contracts/latest/guides/… or you can use EOS Studio (that's what I did and it's much simpler as it provides a GUI). Just get the eosio.token contract from github and deploy it on eosio.token account. Then EOS Studio provides you with actions such as create and issue Commented Apr 15, 2021 at 16:49

I think these threads will answer your question in detail (see the other questions linked in the initial question as well):

Transfer tokens inside a smart contract from an account to another account

here you get more detailed explanations as well: https://github.com/EOSIO/eos/issues/3847

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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