summaryrefslogtreecommitdiffstats
path: root/contracts
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-03-05 18:14:41 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-06 11:00:19 +0800
commita70eade5bc26f9f2c690f57a997c10f16f6938b8 (patch)
tree2203569533808d7fa9b727da136c75403c9c2b4f /contracts
parent26e6498f95fe18a89b174c85eea51f490d8062f5 (diff)
downloaddexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar.gz
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar.bz2
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar.lz
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar.xz
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.tar.zst
dexon-governance-abi-a70eade5bc26f9f2c690f57a997c10f16f6938b8.zip
contracts: add DEXON recovery contract
Diffstat (limited to 'contracts')
-rw-r--r--contracts/Recovery.sol22
1 files changed, 22 insertions, 0 deletions
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);
+ }
+}