2

void apply( uint64_t receiver, uint64_t code, uint64_t action )

What's the difference between receiver and action in eos contract?

  • Why not adopt the answer below? – smarteasy Jun 16 '18 at 3:34
4

This page in the official documentation should help answer this:

diagram

From a global view of an EOSIO blockchain, every node in the EOSIO network gets a copy of and runs every action in every contract. Some of the nodes are doing the actual work of the contract, while others are processing in order to prove the validity of the transaction blocks. It is, therefore, important that contracts be able to determine "who they are", or basically, under which context are they running. Context identification information is provided in the action context, as illustrated in the above diagram by receiver, code, action. receiver is the account that is currently processing the action. code is the account that authorized the contract. action is the ID of the currently running action.

  • 1
    The wiki is deprecated. Could you please add the answer here? – friedger Jul 13 '18 at 8:54
  • Updated the answer to fix URL and include content – confused00 Jul 17 '18 at 7:12
2

Receiver is executing contract.
Code is namespace of action event.
Action is name of the function to execute.

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.