From 4c22934d1f130ee1e9ed44d85afac313f3a6be9c Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:33:38 +1000 Subject: [PATCH] Remove return value from `reserveSlot` --- codex/contracts/market.nim | 9 ++++++--- codex/contracts/marketplace.nim | 2 +- codex/market.nim | 10 ++++++++-- vendor/codex-contracts-eth | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/codex/contracts/market.nim b/codex/contracts/market.nim index e20657697..6357ee732 100644 --- a/codex/contracts/market.nim +++ b/codex/contracts/market.nim @@ -247,11 +247,14 @@ method canProofBeMarkedAsMissing*( trace "Proof cannot be marked as missing", msg = e.msg return false -method reserveSlot*(id: SlotId): Future[bool] {.async.} = +method reserveSlot*(market: OnChainMarket, id: SlotId) {.async.} = discard await market.contract.reserveSlot(id).confirm(0) -method canReserveSlot*(id: SlotId): Future[bool] {.async.} = - discard await market.contract.canReserveSlot(id).confirm(0) +method canReserveSlot*( + market: OnChainMarket, + id: SlotId): Future[bool] {.async.} = + + await market.contract.canReserveSlot(id) method subscribeRequests*(market: OnChainMarket, callback: OnRequest): diff --git a/codex/contracts/marketplace.nim b/codex/contracts/marketplace.nim index 6596c993c..0c8b8b31f 100644 --- a/codex/contracts/marketplace.nim +++ b/codex/contracts/marketplace.nim @@ -52,5 +52,5 @@ proc getPointer*(marketplace: Marketplace, id: SlotId): uint8 {.contract, view.} proc submitProof*(marketplace: Marketplace, id: SlotId, proof: Groth16Proof): ?TransactionResponse {.contract.} proc markProofAsMissing*(marketplace: Marketplace, id: SlotId, period: UInt256): ?TransactionResponse {.contract.} -proc reserveSlot*(marketplace: Marketplace, id: SlotId): bool {.contract.} +proc reserveSlot*(marketplace: Marketplace, id: SlotId): ?TransactionResponse {.contract.} proc canReserveSlot*(marketplace: Marketplace, id: SlotId): bool {.contract, view.} diff --git a/codex/market.nim b/codex/market.nim index 1ebe237dd..94bf9c5af 100644 --- a/codex/market.nim +++ b/codex/market.nim @@ -161,10 +161,16 @@ method canProofBeMarkedAsMissing*(market: Market, period: Period): Future[bool] {.base, async.} = raiseAssert("not implemented") -method reserveSlot*(id: SlotId): Future[bool] {.base, async.} = +method reserveSlot*( + market: Market, + id: SlotId) {.base, async.} = + raiseAssert("not implemented") -method canReserveSlot*(id: SlotId): Future[bool] {.base, async.} = +method canReserveSlot*( + market: Market, + id: SlotId): Future[bool] {.base, async.} = + raiseAssert("not implemented") method subscribeFulfillment*(market: Market, diff --git a/vendor/codex-contracts-eth b/vendor/codex-contracts-eth index b62c72b5e..d2ba8693e 160000 --- a/vendor/codex-contracts-eth +++ b/vendor/codex-contracts-eth @@ -1 +1 @@ -Subproject commit b62c72b5e1a348c2d47c9f3c31c1d712e37286b7 +Subproject commit d2ba8693e772b83e80746ffadc1efc36c836caf0