diff --git a/codex/contracts/market.nim b/codex/contracts/market.nim index e2065769..6357ee73 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 6596c993..0c8b8b31 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 1ebe237d..94bf9c5a 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 b62c72b5..d2ba8693 160000 --- a/vendor/codex-contracts-eth +++ b/vendor/codex-contracts-eth @@ -1 +1 @@ -Subproject commit b62c72b5e1a348c2d47c9f3c31c1d712e37286b7 +Subproject commit d2ba8693e772b83e80746ffadc1efc36c836caf0