TimeHelpers
Last updated
Was this helpful?
Last updated
Was this helpful?
Source:
function``
getBlockNumber
() internal view returns (uint256)
Returns the current block number. Using a function rather than `block.number` allows us to easily mock the block number in tests.
Returns:
uint256
function``
getBlockNumber64
() internal view returns (uint64)
Returns the current block number, converted to uint64. Using a function rather than `block.number` allows us to easily mock the block number in tests.
Returns:
uint64
function``
getTimestamp
() internal view returns (uint256)
Returns the current timestamp. Using a function rather than `block.timestamp` allows us to easily mock it in tests.
Returns:
uint256
function``
getTimestamp64
() internal view returns (uint64)
Returns the current timestamp, converted to uint64. Using a function rather than `block.timestamp` allows us to easily mock it in tests.
Returns:
uint64