summaryrefslogtreecommitdiffstats
path: root/contracts/Recovery.sol
blob: d0535949a8133b53c369bafa16a93186e3117427 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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);
    }
}