2022-09-08 07:56:01 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2024-07-24 16:50:18 +00:00
|
|
|
pragma solidity ^0.8.23;
|
2022-09-08 07:56:01 +00:00
|
|
|
|
|
|
|
import "./Marketplace.sol";
|
|
|
|
|
|
|
|
// exposes internal functions of Marketplace for testing
|
|
|
|
contract TestMarketplace is Marketplace {
|
|
|
|
constructor(
|
2024-01-05 11:27:53 +00:00
|
|
|
MarketplaceConfig memory config,
|
2024-01-10 14:12:06 +00:00
|
|
|
IERC20 token,
|
2024-01-23 12:28:53 +00:00
|
|
|
IGroth16Verifier verifier
|
2023-01-18 14:26:21 +00:00
|
|
|
)
|
2024-01-10 14:12:06 +00:00
|
|
|
Marketplace(config, token, verifier) // solhint-disable-next-line no-empty-blocks
|
2023-01-18 14:26:21 +00:00
|
|
|
{}
|
2022-09-08 07:56:01 +00:00
|
|
|
|
2022-11-23 14:10:58 +00:00
|
|
|
function forciblyFreeSlot(SlotId slotId) public {
|
|
|
|
_forciblyFreeSlot(slotId);
|
2022-09-13 07:18:55 +00:00
|
|
|
}
|
2023-03-08 11:02:34 +00:00
|
|
|
|
|
|
|
function getSlotCollateral(SlotId slotId) public view returns (uint256) {
|
|
|
|
return _slots[slotId].currentCollateral;
|
|
|
|
}
|
2024-01-22 15:43:03 +00:00
|
|
|
|
|
|
|
function challengeToFieldElement(
|
|
|
|
bytes32 challenge
|
|
|
|
) public pure returns (uint256) {
|
|
|
|
return _challengeToFieldElement(challenge);
|
|
|
|
}
|
|
|
|
|
|
|
|
function merkleRootToFieldElement(
|
|
|
|
bytes32 merkleRoot
|
|
|
|
) public pure returns (uint256) {
|
|
|
|
return _merkleRootToFieldElement(merkleRoot);
|
|
|
|
}
|
2022-09-21 09:13:12 +00:00
|
|
|
}
|