dagger-contracts/contracts/TestMarketplace.sol

36 lines
895 B
Solidity
Raw Normal View History

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;
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,
IERC20 token,
IGroth16Verifier verifier
2023-01-18 14:26:21 +00:00
)
Marketplace(config, token, verifier) // solhint-disable-next-line no-empty-blocks
2023-01-18 14:26:21 +00:00
{}
function forciblyFreeSlot(SlotId slotId) public {
_forciblyFreeSlot(slotId);
}
2023-03-08 11:02:34 +00:00
function getSlotCollateral(SlotId slotId) public view returns (uint256) {
return _slots[slotId].currentCollateral;
}
function challengeToFieldElement(
bytes32 challenge
) public pure returns (uint256) {
return _challengeToFieldElement(challenge);
}
function merkleRootToFieldElement(
bytes32 merkleRoot
) public pure returns (uint256) {
return _merkleRootToFieldElement(merkleRoot);
}
}