Skip to content

Instantly share code, notes, and snippets.

@buendiadas
Last active December 9, 2018 23:57
Show Gist options
  • Save buendiadas/7a6dde7a5fa9dba92ed2d3bb96d60fb5 to your computer and use it in GitHub Desktop.
Save buendiadas/7a6dde7a5fa9dba92ed2d3bb96d60fb5 to your computer and use it in GitHub Desktop.
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