fix(integration): fixes hardhat not recognising custom error (#243)

Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
This commit is contained in:
Eric 2025-06-06 05:42:01 +10:00 committed by GitHub
parent 06c76e59b5
commit 3661376327
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -544,7 +544,11 @@ contract Marketplace is SlotReservations, Proofs, StateRetrieval, Endian {
function getActiveSlot(
SlotId slotId
) public view slotIsNotFree(slotId) returns (ActiveSlot memory) {
) public view returns (ActiveSlot memory) {
// Modifier `slotIsNotFree(slotId)` works here, but using the modifier
// causes hardhat to return an error "reverted with an unrecognized custom
// error (return data: 0x8b41ec7f)".
if (_slots[slotId].state == SlotState.Free) revert Marketplace_SlotIsFree();
Slot storage slot = _slots[slotId];
ActiveSlot memory activeSlot;
activeSlot.request = _requests[slot.requestId];