Created
July 22, 2018 18:02
-
-
Save SeptiyanAndika/6b6091a47e8809099e56c3f5cf88890d to your computer and use it in GitHub Desktop.
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.22; | |
contract Hackathon{ | |
address public owner; | |
enum Status {PENDING,APPROVED,REJECTED} | |
string public request_id; | |
string public owner_public_key; | |
string public requestor_public_key; | |
Status public status; | |
constructor (string _request_id, string _owner_public_key, string _requestor_public_key) public{ | |
owner = msg.sender; | |
status = Status.PENDING; | |
request_id = _request_id; | |
owner_public_key = _owner_public_key; | |
requestor_public_key = _requestor_public_key; | |
} | |
modifier onlyOwner() { | |
require(msg.sender == owner); | |
_; | |
} | |
function Approve() public onlyOwner{ | |
status = Status.APPROVED; | |
} | |
function Reject() public onlyOwner{ | |
status = Status.REJECTED; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment