TimeHelpers

contract TimeHelpers

Source: contracts/common/TimeHelpers.sol

Index

Reference

Functions

getBlockNumber

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

getBlockNumber64

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

getTimestamp

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

getTimestamp64

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

Last updated