Source: contracts/common/TimeHelpers.solarrow-up-right
getBlockNumber
getBlockNumber64
getTimestamp
getTimestamp64
function`` getBlockNumber() internal view returns (uint256)
function``
() 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)
() 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.
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.
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.
Last updated 2 years ago
Was this helpful?