Eric Mastro ad040cfee6 [marketplace] extend proof ending
Allow proof ending to be extending once a contract is started, so that all filled slots share an ending time that is equal to the contract end time. Added tests.

Add a mapping for proof id to endId so that proof expectations can be extended for all proofs that share a given endId.

Add function modifiers that require the request state to allow proofs, with accompanying tests.

General clean up of each function’s request state context, with accompanying tests.

General clean up of all tests, including state change “wait” functions and normalising the time advancement functions.
2022-10-25 12:38:19 +11:00

46 lines
1014 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Marketplace.sol";
// exposes internal functions of Marketplace for testing
contract TestMarketplace is Marketplace {
constructor(
IERC20 _token,
uint256 _collateral,
uint256 _proofPeriod,
uint256 _proofTimeout,
uint8 _proofDowntime
)
Marketplace(_token, _collateral, _proofPeriod,_proofTimeout,_proofDowntime)
// solhint-disable-next-line no-empty-blocks
{
}
function isCancelled(bytes32 requestId) public view returns (bool) {
return _isCancelled(requestId);
}
function isSlotCancelled(bytes32 slotId) public view returns (bool) {
return _isSlotCancelled(slotId);
}
function freeSlot(bytes32 slotId) public {
_freeSlot(slotId);
}
function slot(bytes32 slotId) public view returns (Slot memory) {
return _slot(slotId);
}
function testAcceptsProofs(bytes32 slotId)
public
view
slotAcceptsProofs(slotId)
// solhint-disable-next-line no-empty-blocks
{
}
}