- You can send Ether to a contract even if it does not implement a payable function. Generally, sending Ether to a non-payable function will result in a failed transaction.
- A developer can easily overlook this and include some conditions in the contract that check for strict balance equality:
require(this.balance == 1 ether);
- Using such conditions can result in a permanent Denial Of Service (DoS) and can make the contract useless.
- There are multiple methods to force Ether to a contract. It can either be sent through the self-destruct function or by guessing a contract address that might be created in the future.
- The self-destruct function is generally used for removing the data of a contract from the blockchain. It also ...