Guest User

Untitled

a guest
Jan 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. pragma solidity^0.4.21;
  2.  
  3. contract VaccineRegistration {
  4.  
  5. address owner;
  6. address secondary;
  7. address tertiary;
  8.  
  9. constructor(address _secondary, address _tertiary) public {
  10. owner = msg.sender;
  11. secondary = _secondary;
  12. tertiary = _tertiary;
  13. }
  14.  
  15. modifier onlyOwners() {
  16. require(msg.sender == owner ||
  17. msg.sender == secondary ||
  18. msg.sender == tertiary);
  19. _;
  20. }
  21.  
  22. string[] vaccines;
  23.  
  24. function registerData(string _data) public onlyOwners {
  25. vaccines.push(_data);
  26. }
  27.  
  28. function getData(uint _index) public onlyOwners view returns(string _data) {
  29. return vaccines[_index];
  30. }
  31.  
  32. }
Add Comment
Please, Sign In to add comment