From 58a962add8a5a46b774889320f1490ffc056eb08 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 28 Jan 2025 12:16:24 +0100 Subject: [PATCH] Update contracts and add custom errors (#1088) --- codex/contracts/marketplace.nim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/codex/contracts/marketplace.nim b/codex/contracts/marketplace.nim index cdcb4238..87fd1e47 100644 --- a/codex/contracts/marketplace.nim +++ b/codex/contracts/marketplace.nim @@ -37,6 +37,11 @@ type Marketplace_SlotIsFree* = object of SolidityError Marketplace_ReservationRequired* = object of SolidityError Marketplace_NothingToWithdraw* = object of SolidityError + Marketplace_InsufficientDuration* = object of SolidityError + Marketplace_InsufficientProofProbability* = object of SolidityError + Marketplace_InsufficientCollateral* = object of SolidityError + Marketplace_InsufficientReward* = object of SolidityError + Marketplace_InvalidCid* = object of SolidityError Proofs_InsufficientBlockHeight* = object of SolidityError Proofs_InvalidProof* = object of SolidityError Proofs_ProofAlreadySubmitted* = object of SolidityError @@ -45,6 +50,8 @@ type Proofs_ProofNotMissing* = object of SolidityError Proofs_ProofNotRequired* = object of SolidityError Proofs_ProofAlreadyMarkedMissing* = object of SolidityError + Proofs_InvalidProbability* = object of SolidityError + Periods_InvalidSecondsPerPeriod* = object of SolidityError proc configuration*(marketplace: Marketplace): MarketplaceConfig {.contract, view.} proc token*(marketplace: Marketplace): Address {.contract, view.}