Remove return value from `reserveSlot`

This commit is contained in:
Eric 2024-09-19 14:33:38 +10:00
parent 104bf5e0a7
commit 4c22934d1f
No known key found for this signature in database
4 changed files with 16 additions and 7 deletions

View File

@ -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):

View File

@ -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.}

View File

@ -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,

@ -1 +1 @@
Subproject commit b62c72b5e1a348c2d47c9f3c31c1d712e37286b7
Subproject commit d2ba8693e772b83e80746ffadc1efc36c836caf0