Created
September 28, 2018 00:22
-
-
Save dev-yohan/537db016d16b02734f9f60b4f3ae811c to your computer and use it in GitHub Desktop.
"Oracle" for last will contract
This file contains hidden or 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
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