-
-
Save roynalnaruto/48725ed6b19b3564d2b5582141e4b37d to your computer and use it in GitHub Desktop.
Hodling contract
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
contract HodlFactory { | |
address public daddyHodler; | |
function HodlFactory() public { | |
daddyHodler = msg.sender; | |
} | |
function birthOfHodler() | |
public | |
returns (address _new_hodl_at) | |
{ | |
Hodl new_hodl = new Hodl(msg.sender); | |
_new_hodl_at = new_hodl.address; | |
} | |
} | |
contract Hodl { | |
address public hodler; | |
uint256 public locked_up_until; | |
bool public locked; | |
modifier if_not_locked() { | |
require(locked == false); | |
_; | |
} | |
modifier if_not_configured() { | |
require(configured == false); | |
_; | |
} | |
function Hodl(address _hodler) public { | |
hodler = _hodler; | |
locked = false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment