Skip to content

Instantly share code, notes, and snippets.

@roynalnaruto
Last active March 16, 2018 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roynalnaruto/48725ed6b19b3564d2b5582141e4b37d to your computer and use it in GitHub Desktop.
Save roynalnaruto/48725ed6b19b3564d2b5582141e4b37d to your computer and use it in GitHub Desktop.
Hodling contract
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