torn-token/contracts/mocks/Timestamp.sol
2020-12-15 18:05:35 +03:00

15 lines
352 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
contract Timestamp {
uint256 public fakeTimestamp;
function setFakeTimestamp(uint256 _fakeTimestamp) public {
fakeTimestamp = _fakeTimestamp;
}
function blockTimestamp() public view virtual returns (uint256) {
return fakeTimestamp == 0 ? block.timestamp : fakeTimestamp;
}
}