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

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

31 lines
687 B
Solidity

pragma solidity 0.5.17;
import "../../lib/Checkpointing.sol";
contract CheckpointingMock {
using Checkpointing for Checkpointing.History;
Checkpointing.History history;
function add(uint64 value, uint256 time) public {
history.add(value, time);
}
function getLast() public view returns (uint256) {
return history.getLast();
}
function get(uint64 time) public view returns (uint256) {
return history.get(time);
}
function getHistorySize() public view returns (uint256) {
return history.history.length;
}
function lastUpdate() public view returns (uint256) {
return history.lastUpdate();
}
}