Skip to content

Instantly share code, notes, and snippets.

@SeptiyanAndika
Created July 22, 2018 18:02
Show Gist options
  • Save SeptiyanAndika/6b6091a47e8809099e56c3f5cf88890d to your computer and use it in GitHub Desktop.
Save SeptiyanAndika/6b6091a47e8809099e56c3f5cf88890d to your computer and use it in GitHub Desktop.
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