August 2019
Intermediate to advanced
486 pages
13h 52m
English
While writing a contract, you can define a payable fallback function to accept ether in your contract, as follows:
function() external payable { }
If this fallback function is not present in a contract and it does not have the payable modifier for any function, then your contract is not meant to receive ether.
However, there is still a possible way to send ether to a contract that does not accept ether. This is possible via a selfdestruct function call: