Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Issue using multiple eosio::on_notify #891

Open
DenisCarriere opened this issue May 23, 2020 · 1 comment
Open

Issue using multiple eosio::on_notify #891

DenisCarriere opened this issue May 23, 2020 · 1 comment

Comments

@DenisCarriere
Copy link

DenisCarriere commented May 23, 2020

I'm running into an issue where if I specify multiple eosio::on_notify it excludes the wildcard "*" on notifications contracts.

My Scenario

Need to listen on all incoming transfer for multiple tokens & retire for mytoken

[[eosio::on_notify("*::transfer")]]
void on_transfer( ... );

[[eosio::on_notify("mytoken::retire")]]
void on_retire( ... );

❗ Issue

Now eosio::on_notify("*::transfer") does not monitor mytoken::transfer since it only monitors mytoken::retire

Work around

This seems like a functional work around for integrating multiple on_notify with specified contracts.

[[eosio::on_notify("*::transfer")]]
void on_transfer( ... );

[[eosio::on_notify("*::retire")]]
void on_retire( ... ) {
  if ( get_first_receiver() != "mytoken"_n ) return;
@sanaraufx
Copy link

This was fixed in 1.6.3 cdt and verified in PR #9244. Please let us know if this is still an issue for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants