void apply( uint64_t receiver, uint64_t code, uint64_t action )
What's the difference between receiver and action in eos contract?
This page in the official documentation should help answer this:
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.
Receiver
is executing contract.
Code
is namespace of action event.
Action
is name of the function to execute.