mirror of
https://github.com/codex-storage/codex-contracts-eth.git
synced 2025-01-22 01:19:55 +00:00
716b864f02
Update `Marketplace.state` getter to to take `isCancelled` into account. This state can then be used internally and externally. Add checks to `proofEnd`, `isProofRequired`, `willProofBeRequired`, and `getChallenge` that understands if the request is in a state to accept proofs. If not, return other values. Add `slotMustAcceptProofs` modifier, originally introduced in a later PR, which requires the request to be in state of the request accepting proofs. Add tests for all the above.
28 lines
689 B
Solidity
28 lines
689 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);
|
|
}
|
|
} |