August 2019
Intermediate to advanced
486 pages
13h 52m
English
At the moment, there is no possible way to prevent forceful ether sending from happening.
However, the developer should caution that you should not assume any specific amount of ether in the contract and write the contract logic. If you do so, an attacker can attack and might lock your contract by sending some ether to your contract forcefully. For example, you should not use address(this).balance in your code to check the contract ether balance and compare it with any specific value.