laconicd-deprecated/tests/solidity/suites/staking/contracts/test/mocks/TimeLockManagerMock.sol
Federico Kunze 96cad7de9c
tests: reorganize packages (#7)
* tests: reorganize testing packages

* gitignore and minor changes
2021-05-11 07:54:55 -04:00

37 lines
848 B
Solidity

pragma solidity 0.5.17;
import "../../locking/TimeLockManager.sol";
import "../../Staking.sol";
contract TimeLockManagerMock is TimeLockManager {
uint64 public constant MAX_UINT64 = uint64(-1);
uint256 _mockTime = now;
uint256 _mockBlockNumber = block.number;
function getTimestampExt() external view returns (uint256) {
return getTimestamp();
}
function getBlockNumberExt() external view returns (uint256) {
return getBlockNumber();
}
function setTimestamp(uint256 i) public {
_mockTime = i;
}
function setBlockNumber(uint256 i) public {
_mockBlockNumber = i;
}
function getTimestamp() internal view returns (uint256) {
return _mockTime;
}
function getBlockNumber() internal view returns (uint256) {
return _mockBlockNumber;
}
}