Created
June 25, 2019 14:27
-
-
Save 0GiS0/aa3bc42f2cf29bc987dca9cf98d1d759 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