dagger-contracts/contracts/TestProofs.sol

75 lines
1.6 KiB
Solidity
Raw Normal View History

// 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)
// solhint-disable-next-line no-empty-blocks
{
}
function period() public view returns (uint256) {
return _period();
}
function timeout() public view returns (uint256) {
return _timeout();
}
2022-09-29 10:31:57 +00:00
function end(EndId id) public view returns (uint256) {
return _end(id);
}
function missed(ProofId id) public view returns (uint256) {
return _missed(id);
}
function expectProofs(
ProofId id,
EndId endId,
uint256 _probability
) public {
_expectProofs(id, endId, _probability);
}
function unexpectProofs(ProofId id) public {
_unexpectProofs(id);
}
function isProofRequired(ProofId id) public view returns (bool) {
return _isProofRequired(id);
}
function willProofBeRequired(ProofId id) public view returns (bool) {
return _willProofBeRequired(id);
}
function getChallenge(ProofId id) public view returns (bytes32) {
2022-03-10 12:04:46 +00:00
return _getChallenge(id);
}
function getPointer(ProofId id) public view returns (uint8) {
return _getPointer(id);
}
function submitProof(ProofId id, bytes calldata proof) public {
_submitProof(id, proof);
}
function markProofAsMissing(ProofId id, uint256 _period) public {
_markProofAsMissing(id, _period);
}
2022-09-29 10:31:57 +00:00
function setProofEnd(EndId id, uint256 ending) public {
_setProofEnd(id, ending);
}
}