0

Let's say I wanted to act upon receipt of a token and/or a message to a smart contract. Previous versions of EOS used the apply function to do this, however as of v1.6 things have changed to pure cpp libraries. What is the proper way to act upon an event using only the cpp libraries of v1.6?

1

What I was looking for is:

[[eosio::on_notify("contract::transfer")]]
void somefunction(name        from,
                  name        to,
                  asset       quantity,
                  const std::string& memo);
using transfer_action = action_wrapper<"transfer"_n, &contract::somefunction>;
| improve this answer | |

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.