-
Forced Ether Transfer
via selfdestrcut method ether can be transferred without using payable key word. here is the example.
-
Self Destruct method of Smart Contract in Solidity
Here is the code example how can we destruct a contract. For destruction we have to set the payable address in selfdestruct method where all ethers of contract can be transferred. After destruct a contract all state variables become null, 0 or false, also we can’t update any state variable. e.g.
-
Ownerable Pattern in Solidity
In this pattern we can define the owner of a contract, which restrict or control the protected methods, also can transfer his ownership to another.
-
Speed Dump Pattern in Solidity
Delay in withdraw can save smart contract from malicious activity. Here is the example how you can apply a delay in smart contract.
-
Circuit Break Pattern in Solidity
In the live contract there are many chances we find an type of error and we have to stop smart contract to handle malicious activity. here is the sample of Circuit Break Pattern.
-
Difference between Send, Transfer, Call methods and reentrancy Attack and its Solution.
You can see here the difference b/w transfer, send method. Now, Here is the difference b/w transfer, send and call method. Here is the reentrancy attack Now protect from reentrancy attack: Another example to protect contract from reentrancy attack with the help of modifier: