1

I have read that:

In order to call an inline action, that is to call an action of contract A from contract B, there is a need to set some special permission. In this case, the Ram payer for the action in contract B must-have “accountname A@eosio.code” permission in its active. In a case, if account C needs to call an action in account A through a contract in account B, then account C need to set the accountB@eosio.code in its active.

But I observed that:

  1. Contract B must-have “accountname B@eosio.code” permission in its active even to call function from contract A & not “accountname A@eosio.code” permission in its active.
  2. If account C needs to call an action in account A through a contract in account B, then account C need to set the accountB@eosio.code in its active. This is true but is there any alternative that C can use contract B to call action from contract A without changing its permissions. Because in dapp it is not feasible for every user to do that.

I'm confused a bit about the all this. Can anyone please give me a clear guidance? Also, in accordance with the v2.0Latest version

0

If a contract has an inline action, the permission for running that action must be eosio.code from that contract account. Thats it.

Example: accounta is a smart contract with an inline action to accountb. Therefore accounta will need the permission accounta@eosio.code, as the contract will need to execute the inline action.

  • And what about some account who wants use actions in contract of accounta (with an inline action to accountb) ? – coder Feb 27 at 6:13
  • It's still accounta that is calling that action on accountb – Phillip Hamnett - EOS42 Feb 27 at 8:15

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.