mirror of
https://github.com/codex-storage/codex-contracts-eth.git
synced 2025-01-21 17:10:00 +00:00
321132b6fa
1. Replace all instances of `now()` with `await currentTime()` to get a more accurate representation of time from the block timestamp. Update examples.js to be async. 2. Move `RequestState` to `marketplace.js` 3. Delete `TestStorage` as `slashAmount` function no longer needed.
46 lines
1017 B
Solidity
46 lines
1017 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
|
|
slotMustAcceptProofs(slotId)
|
|
// solhint-disable-next-line no-empty-blocks
|
|
{
|
|
|
|
}
|
|
}
|