Skip to main content

Custom errors

Solidity custom errors emitted by SealedAuction, BidPayload, and AuctionRevealCondition. The SDK maps these to human-readable messages; see web/lib/walletError.ts for the canonical translation table used in the marketplace UI.

SealedAuction

DeadlineInPast

createAuction was called with deadline <= block.timestamp. Pick a deadline in the future.

"Deadline is in the past — pick a deadline at least a minute from now."

UnknownAuction

A function was called with an auctionId that has no record in storage.

"Auction not found."

BiddingClosed

allocateBidSlot or submitEncryptedBid was called when the auction is not in Open state, or after the deadline has passed.

"Bidding has closed. The deadline has passed and sealed bids are no longer accepted."

ZeroDeposit

allocateBidSlot was called with deposit == 0. The deposit is the upper bound on what the bid can be; it must be positive.

"Deposit must be > 0."

DepositTransferFailed

The WIP.transferFrom call inside allocateBidSlot reverted. The bidder either has insufficient WIP balance or has not approved enough.

"Couldn't pull deposit. WIP approval or balance was insufficient. Re-approve and try again."

NotBidder

submitEncryptedBid was called by an address that did not allocate the slot. Only the wallet that called allocateBidSlot may submit the matching ciphertext.

"Wrong wallet. Only the wallet that allocated this bid slot can submit its ciphertext."

UnknownBidSlot

submitEncryptedBid was called with a uuid that doesn't correspond to any allocated slot for this auction.

"Bid slot not found. Allocate a slot before submitting a ciphertext."

CiphertextAlreadyWritten

submitEncryptedBid was called for a uuid that already has ciphertext. Slots accept exactly one write.

"Bid already sealed. This slot has already received its encrypted bid."

NotSeller

submitEncryptedReserve was called by an address other than auction.seller.

"Not the seller. Only the auction's seller can submit the sealed reserve."

ReserveAlreadyWritten

submitEncryptedReserve was called for an auction whose reserve vault already has ciphertext. The reserve accepts exactly one write.

"Reserve already sealed. The encrypted reserve has already been submitted for this auction."

DeadlineNotReached

trigger was called before the auction's deadline. Bidding is still open.

"Too early. Wait for the deadline to pass before triggering the auction."

WrongState

trigger was called on an auction not in Open state.

"Auction in wrong state. The action isn't valid for this auction's current state."

WrongStateForSettle

settle was called on an auction that is not in Triggered state. The auction must be triggered before settling.

"Not ready to settle. Trigger the auction first."

InvalidReserveReveal

settle was called with a ReserveReveal whose signature does not recover to auction.seller. This fires only when the seller did seal a reserve (reserveHasCiphertext == true). A zero or omitted signature recovers address(0), which also triggers this error.

"Invalid reserve reveal. The reserve signature could not be verified against the seller."

MintFailed

LicensingModule.mintLicenseTokens reverted inside settle. Usually means the PIL terms aren't properly attached to the IP, or the IP id is malformed.

"License mint failed. Story Protocol rejected the license mint. Check terms + ip id."

BidPayload

InvalidPayloadLength

BidPayload.decode was called with a byte string that is not exactly 149 bytes. The wire format is fixed-size.

"Malformed payload. Bid payload is the wrong length. Try re-bidding."

InvalidSignatureLength

BidPayload.encode or BidPayload.recoverSigner was called with a signature that is not 65 bytes.

"Malformed signature. Bid signature is the wrong length. Try re-signing."

AuctionRevealCondition

NotRegistrar

register was called by an address other than sealedAuction. Only SealedAuction is the authorized registrar.

"Internal error: condition registration attempted by wrong contract."

AlreadyRegistered

register was called for a uuid that already has a deadline stored. Each uuid may only be registered once.

InvalidDeadline

register was called with deadline == 0.

User-rejection (wallet-level)

These don't originate from SealedIP contracts; they come from the wallet or RPC layer. The SDK and UI handle them as part of the same error surface.

  • UserRejectedRequestError — the user clicked Reject in the wallet popup
  • Replacement transaction underpriced — stuck transaction at this nonce
  • Insufficient funds — not enough native IP for gas
  • Chain mismatch — wallet is on the wrong network

All of these are humanized in web/lib/walletError.ts and surfaced via WalletErrorPanel.