0

enter image description here

enter image description here

Network: kylin testnet.

I transferred eos to this contract, but it the "deposit" function was not called. What do I miss?

  • CDT version: v1.6.1 – Shane May 15 '19 at 4:01
  • Trying to help here: Can you specify the part "not working". Can you please edit the question 1) what is the result you are expecting to happen 2) what actually happens? – Mikko Ohtamaa May 15 '19 at 8:12
  • sorry, I added that result. – Shane May 15 '19 at 10:52
1

I believe the action wrapper is needed to map the transfer action to the deposit function, the notification by itself is not sufficient.

try adding to ln15 of header:

[[eosio::on_notify("eosio.token::transfer")]]
void deposit(name from, name to,asset quantity, string memo);
using transfer_action = action_wrapper<name("transfer"), &hello::deposit>;
  • Please explain your answer with a few lines. StackExchange guidelines encourages us to set posts into a context, so that others can understand your solution more easily. – TeeAttack42 May 22 '19 at 10:33
  • 2
    updated, the answer to include more lines on context. I believe the action wrapper is needed to map the transfer action to the deposit function, the notification by itself is not sufficient. – cryptosig May 22 '19 at 20:56
  • where is the official documentation for how this is done? – ekkis Dec 13 '19 at 1:48

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.