Created
July 21, 2018 19:54
-
-
Save vasa-develop/32b7472991feaeda33e5eb96af980d7a to your computer and use it in GitHub Desktop.
DO NOT USE THIS CODE. THIS CODE IS USED TO DEMONSTRATE A VULNERABILITY IN A SOLIDITY CODE.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool public isFinalized = false; | |
address public owner; // gets set somewhere | |
function finalize() public { | |
require(msg.sender == owner); | |
isFinalized == true; | |
} | |
// ... extra ICO functionality | |
// overloaded transfer function | |
function transfer(address _to, uint _value) returns (bool) { | |
require(isFinalized); | |
super.transfer(_to,_value) | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment