From a70eade5bc26f9f2c690f57a997c10f16f6938b8 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Tue, 5 Mar 2019 18:14:41 +0800 Subject: contracts: add DEXON recovery contract --- contracts/Recovery.sol | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 contracts/Recovery.sol (limited to 'contracts/Recovery.sol') diff --git a/contracts/Recovery.sol b/contracts/Recovery.sol new file mode 100644 index 0000000..d053594 --- /dev/null +++ b/contracts/Recovery.sol @@ -0,0 +1,22 @@ +pragma solidity ^0.5.0; + +import "openzeppelin-solidity/contracts/ownership/Ownable.sol"; + +contract Recovery is Ownable { + uint256 depositValue; + + event VotedForRecovery(uint256 indexed height, address voter); + + function setDeposit(uint256 DepositValue) public onlyOwner { + depositValue = DepositValue; + } + + function withdraw(address payable destination) public onlyOwner { + destination.send(address(this).balance); + } + + function voteForSkipBlock(uint256 height) public payable { + require(msg.value >= depositValue); + emit VotedForRecovery(height, msg.sender); + } +} -- cgit v1.2.3