I would like to make a contract, wich listens to the incoming transfers.
How do I make a listener contract, wich listens to incoming transfers on the account?
I would like to make a contract, wich listens to the incoming transfers.
How do I make a listener contract, wich listens to incoming transfers on the account?
My solution is:
1 I modify the eosio token contract. First I put the new method wich we want to run after the transfer contract. Forexample: after_transfer (){....}
[[eosio::on_notify("*::transfer")]] void after_transfer(eosio::name from, eosio::name to, eosio::asset quantity, std::string memo);
This is modify eosio token contract. I deployed to the eos account. So if somewhere use transfer method..(transfer token to account wich contain the modify transfer method) after the transfer run the second method (after_transfer())
The solution is a "eosio::on_notify".