2021-11-01 11:30:35 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
pragma solidity ^0.8.0;
|
|
|
|
|
|
|
|
import "./Proofs.sol";
|
|
|
|
|
|
|
|
// exposes internal functions of Proofs for testing
|
|
|
|
contract TestProofs is Proofs {
|
2022-02-09 13:17:23 +00:00
|
|
|
function period(bytes32 id) public view returns (uint256) {
|
2021-11-01 11:30:35 +00:00
|
|
|
return _period(id);
|
|
|
|
}
|
|
|
|
|
2022-02-09 13:17:23 +00:00
|
|
|
function timeout(bytes32 id) public view returns (uint256) {
|
2021-11-01 11:30:35 +00:00
|
|
|
return _timeout(id);
|
|
|
|
}
|
|
|
|
|
2022-02-09 13:17:23 +00:00
|
|
|
function end(bytes32 id) public view returns (uint256) {
|
2021-11-03 12:24:50 +00:00
|
|
|
return _end(id);
|
|
|
|
}
|
|
|
|
|
2022-02-09 13:17:23 +00:00
|
|
|
function missed(bytes32 id) public view returns (uint256) {
|
2021-11-01 11:30:35 +00:00
|
|
|
return _missed(id);
|
|
|
|
}
|
|
|
|
|
2021-11-03 12:24:50 +00:00
|
|
|
function expectProofs(
|
|
|
|
bytes32 id,
|
2022-02-09 13:17:23 +00:00
|
|
|
uint256 _period,
|
|
|
|
uint256 _timeout,
|
|
|
|
uint256 _duration
|
2021-11-03 12:24:50 +00:00
|
|
|
) public {
|
|
|
|
_expectProofs(id, _period, _timeout, _duration);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2022-02-09 13:17:23 +00:00
|
|
|
function isProofRequired(bytes32 id, uint256 blocknumber)
|
|
|
|
public
|
|
|
|
view
|
2021-11-01 11:30:35 +00:00
|
|
|
returns (bool)
|
|
|
|
{
|
|
|
|
return _isProofRequired(id, blocknumber);
|
|
|
|
}
|
|
|
|
|
|
|
|
function submitProof(
|
|
|
|
bytes32 id,
|
2022-02-09 13:17:23 +00:00
|
|
|
uint256 blocknumber,
|
2021-11-01 11:30:35 +00:00
|
|
|
bool proof
|
2022-02-09 13:17:23 +00:00
|
|
|
) public {
|
2021-11-01 11:30:35 +00:00
|
|
|
_submitProof(id, blocknumber, proof);
|
|
|
|
}
|
|
|
|
|
2022-02-09 13:17:23 +00:00
|
|
|
function markProofAsMissing(bytes32 id, uint256 blocknumber) public {
|
|
|
|
_markProofAsMissing(id, blocknumber);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
}
|