eos icon indicating copy to clipboard operation
eos copied to clipboard

how to write inline communication

Open breadbread1984 opened this issue 8 years ago • 5 comments

I want to call action from another smart contract but don't know how to do it. I find a example in eosio.token whose issue action use SEND_INLINE_ACTION to call an action of the same contract.How do I call an action from a different contract?Thx

breadbread1984 avatar Jun 11 '18 09:06 breadbread1984

Provide the contract as the name scope and specify a method from the contract's ABI to thereafter execute it. It's over in the docs here: https://developers.eos.io/eosio-cpp/reference#action-1

iwasaki-kenta avatar Jun 11 '18 10:06 iwasaki-kenta

thx i am learning it

breadbread1984 avatar Jun 13 '18 08:06 breadbread1984

@iwasaki-kenta do i need to include the header file in the currenct directory if i want to compile a contract with inline action call to the other contract.

GeneSourceCode avatar Jun 15 '18 00:06 GeneSourceCode

@GeneSourceCode Nope.

iwasaki-kenta avatar Jul 03 '18 03:07 iwasaki-kenta

But it does not work for system contract action like newaccount, all in native.hpp. I wonder why?

yankunsam avatar Jul 03 '18 07:07 yankunsam