Guest User

Untitled

a guest
Jul 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. pragma solidity ^0.4.22;
  2.  
  3. contract Hackathon{
  4. address public owner;
  5. enum Status {PENDING,APPROVED,REJECTED}
  6.  
  7. string public request_id;
  8. string public owner_public_key;
  9. string public requestor_public_key;
  10. Status public status;
  11.  
  12.  
  13. constructor (string _request_id, string _owner_public_key, string _requestor_public_key) public{
  14. owner = msg.sender;
  15. status = Status.PENDING;
  16. request_id = _request_id;
  17. owner_public_key = _owner_public_key;
  18. requestor_public_key = _requestor_public_key;
  19. }
  20.  
  21. modifier onlyOwner() {
  22. require(msg.sender == owner);
  23. _;
  24. }
  25.  
  26. function Approve() public onlyOwner{
  27. status = Status.APPROVED;
  28. }
  29.  
  30. function Reject() public onlyOwner{
  31. status = Status.REJECTED;
  32. }
  33.  
  34.  
  35. }
Add Comment
Please, Sign In to add comment