Merge branch 'fix/storage-request-mined' into feature/ceremony-files

This commit is contained in:
benbierens 2024-05-10 09:37:14 +02:00
commit 0b6357ff54
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
3 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ method requestStorage(market: OnChainMarket, request: StorageRequest){.async.} =
convertEthersError:
debug "Requesting storage"
await market.approveFunds(request.price())
await market.contract.requestStorage(request)
discard await market.contract.requestStorage(request).confirm(1)
method getRequest(market: OnChainMarket,
id: RequestId): Future[?StorageRequest] {.async.} =

View File

@ -42,7 +42,7 @@ proc slashMisses*(marketplace: Marketplace): UInt256 {.contract, view.}
proc slashPercentage*(marketplace: Marketplace): UInt256 {.contract, view.}
proc minCollateralThreshold*(marketplace: Marketplace): UInt256 {.contract, view.}
proc requestStorage*(marketplace: Marketplace, request: StorageRequest) {.contract.}
proc requestStorage*(marketplace: Marketplace, request: StorageRequest): ?TransactionResponse {.contract.}
proc fillSlot*(marketplace: Marketplace, requestId: RequestId, slotIndex: UInt256, proof: Groth16Proof) {.contract.}
proc withdrawFunds*(marketplace: Marketplace, requestId: RequestId) {.contract.}
proc freeSlot*(marketplace: Marketplace, id: SlotId) {.contract.}

View File

@ -39,7 +39,7 @@ ethersuite "Marketplace contracts":
switchAccount(client)
discard await token.approve(marketplace.address, request.price)
await marketplace.requestStorage(request)
discard await marketplace.requestStorage(request)
switchAccount(host)
discard await token.approve(marketplace.address, request.ask.collateral)
await marketplace.fillSlot(request.id, 0.u256, proof)