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-03-10 09:19:21 +00:00
|
|
|
constructor(
|
|
|
|
uint256 __period,
|
|
|
|
uint256 __timeout,
|
|
|
|
uint8 __downtime
|
|
|
|
)
|
|
|
|
Proofs(__period, __timeout, __downtime)
|
2022-03-02 14:44:58 +00:00
|
|
|
// solhint-disable-next-line no-empty-blocks
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function period() public view returns (uint256) {
|
|
|
|
return _period();
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2022-03-02 14:44:58 +00:00
|
|
|
function timeout() public view returns (uint256) {
|
|
|
|
return _timeout();
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2022-03-08 14:58:08 +00:00
|
|
|
function expectProofs(
|
|
|
|
bytes32 id,
|
|
|
|
uint256 _probability,
|
|
|
|
uint256 _duration
|
|
|
|
) public {
|
|
|
|
_expectProofs(id, _probability, _duration);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2022-03-08 14:58:08 +00:00
|
|
|
function isProofRequired(bytes32 id) public view returns (bool) {
|
|
|
|
return _isProofRequired(id);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2022-04-05 09:27:02 +00:00
|
|
|
function willProofBeRequired(bytes32 id) public view returns (bool) {
|
|
|
|
return _willProofBeRequired(id);
|
|
|
|
}
|
|
|
|
|
2022-03-10 12:04:46 +00:00
|
|
|
function getChallenge(bytes32 id) public view returns (bytes32) {
|
|
|
|
return _getChallenge(id);
|
|
|
|
}
|
|
|
|
|
2022-03-10 12:35:41 +00:00
|
|
|
function getPointer(bytes32 id) public view returns (uint8) {
|
|
|
|
return _getPointer(id);
|
|
|
|
}
|
|
|
|
|
2022-04-12 06:43:47 +00:00
|
|
|
function submitProof(bytes32 id, bytes calldata proof) public {
|
2022-03-08 14:58:08 +00:00
|
|
|
_submitProof(id, proof);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2022-03-08 14:58:08 +00:00
|
|
|
function markProofAsMissing(bytes32 id, uint256 _period) public {
|
|
|
|
_markProofAsMissing(id, _period);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
}
|