0

Is there a way to get the index (ordinal) of the current action that is being processed?

If you could access apply_context you could do get_action_id() but afaik that isn't exposed inside an action.

What I would like is to be able to know the contract that is being executed that I'm being notified of inside a notification handler like [[eosio::on_notify("*::transfer")]]

2 Answers 2

0

To get the contract the notification originated from, you can use get_first_receiver() but I'd still like to know if it's possible to get the action ordinal, so, if anybody knows, please respond 😊

0

I don't think that this is possible atm.

Looking at the intrinsics_def.hpp in the cdt, there is no intrinsic to get the action_ordinal of an action called. Pretty sure this is the place where it would be found if there was such functionallity.

1
  • Maybe worth opening a issue.
    – cmadh
    Aug 20 at 16:07

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.