A call, any call, has a caller, can have a value and can have some data. The value can be zero, the data can be empty, doesn't matter. By default as explained in the chosen answer, all calls are valid.
Now if a call is received by a smart contract, there are multiple possible scenarios:
The message data is empty: The execution of the transaction continues at the receive()
function or the fallback()
function if the former is not implemented. If neither of them is available, the transaction will revert.
The call has data: the contract will look at the 4 first bytes and see if it matches one of the registered function selectors (functions marked as public
or external
. If it finds a match, the transaction execution will continue at that function's location in the bytecode, if not, same as for case (1): it will look for the fallback
or revert.
The message data's first 4 bytes correspond to a function selector that exists on the receiving contract: the transaction's execution will continue by jumping to that part in the contract's code that contains the recognized function selector.
3a. If the message also had value and the function wasn't marked as payable
in the solidity code, the function will revert because the Solidity compiler adds that condition explicitly