1

I am trying to use INLINE_ACTION_SENDER to use an action from another contract but get the following error.

error: use of undeclared identifier 'INLINE_ACTION_SENDER'

How do I include this macro in my code?

1

It's in action.hpp. Are you in dawn-v4.0.0?

https://github.com/EOSIO/eos/blob/dawn-v4.0.0/contracts/eosiolib/action.hpp#L226

This is the definition:

#define INLINE_ACTION_SENDER(...) BOOST_PP_OVERLOAD(INLINE_ACTION_SENDER,__VA_ARGS__)(__VA_ARGS__)

And this is an usage example:

 INLINE_ACTION_SENDER(eosio::token, transfer)( N(eosio.token), {payer,N(active)},
                                               { payer, N(eosio), quant, std::string("buy ram") } );

EDIT:

Please check this out before using INLINE_ACTION_SENDER: https://eosio.stackexchange.com/a/320/54

|improve this answer|||||
  • If anyone could explain the first agrument eosio::token that would be great. I am trying to send an action in another contract I created called helloworld however when I use helloworld as the first argument I get error: 'helloworld' does not refer to a value – Magic Man Xpress May 17 '18 at 3:02
  • @MagicManXpress Good question. Try asking it as a new question so more people see it. – kkurian May 18 '18 at 7:20
  • Check my edit suggestion before using INLINE_ACTION_SENDER :P – Leo Ribeiro May 18 '18 at 14:40

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.