Last active
December 9, 2018 23:57
-
-
Save buendiadas/7a6dde7a5fa9dba92ed2d3bb96d60fb5 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.4.24; | |
contract Period { | |
uint256 creationBlock; | |
constructor() public { | |
timestamp = block.timestamp; | |
} | |
function height() public view returns (uint) { | |
return (block.number - creationBlock) / T; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment