Skip to content

Instantly share code, notes, and snippets.

@dev-yohan
Created September 28, 2018 00:22
Show Gist options
  • Save dev-yohan/537db016d16b02734f9f60b4f3ae811c to your computer and use it in GitHub Desktop.
Save dev-yohan/537db016d16b02734f9f60b4f3ae811c to your computer and use it in GitHub Desktop.
"Oracle" for last will contract
pragma solidity ^0.4.24;
contract LastWill {
address public Owner ;
address public heredero;
address public reloj;
constructor () {
Owner = msg.sender;
reloj = 0x14723a09acff6d2a60dcdf7aa4aff308fddc160c;
}
function DonarDinero() public payable {
require(msg.sender == Owner, "no es la persona");
}
function asignarHeredero(address _heredero) public{
heredero = _heredero;
}
function estaMuerto() public{
require(msg.sender==reloj,"no es una cuenta valida");
heredero.transfer(address(this).balance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment