Created
June 24, 2019 06:13
-
-
Save 0GiS0/306be64a60dc3f0d3a4aa0bdc0ed1cf4 to your computer and use it in GitHub Desktop.
This file contains 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.5.8; | |
contract TimeControl{ | |
address private owner; | |
mapping (address => uint[]) private employeeRecords; | |
constructor() public{ | |
owner = msg.sender; | |
} | |
function Register() public{ | |
employeeRecords[msg.sender].push(now); | |
} | |
function GetMyRegistries() public view returns (uint[] memory){ | |
uint[] memory result = new uint[] (employeeRecords[msg.sender].length); | |
for (uint i = 0;i < employeeRecords[msg.sender].length; i++) { | |
result[i] = employeeRecords[msg.sender][i]; | |
} | |
return result; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment