Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pragma solidity^0.4.21;
- contract VaccineRegistration {
- address owner;
- address secondary;
- address tertiary;
- constructor(address _secondary, address _tertiary) public {
- owner = msg.sender;
- secondary = _secondary;
- tertiary = _tertiary;
- }
- modifier onlyOwners() {
- require(msg.sender == owner ||
- msg.sender == secondary ||
- msg.sender == tertiary);
- _;
- }
- string[] vaccines;
- function registerData(string _data) public onlyOwners {
- vaccines.push(_data);
- }
- function getData(uint _index) public onlyOwners view returns(string _data) {
- return vaccines[_index];
- }
- }
Add Comment
Please, Sign In to add comment