[contracts] Fix failing test

With the new solidity contracts update, a contract can only
be paid out after it started.
This commit is contained in:
Mark Spanbroek 2022-10-25 08:59:42 +02:00
parent e05dcdd3f4
commit eb7c2fdc64
1 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,10 @@ ethersuite "Storage contracts":
):
await provider.advanceTime(periodicity.seconds)
proc startContract() {.async.} =
for slotIndex in 1..<request.ask.slots:
await storage.fillSlot(request.id, slotIndex.u256, proof)
test "accept storage proofs":
switchAccount(host)
await waitUntilProofRequired(slotId)
@ -73,6 +77,7 @@ ethersuite "Storage contracts":
test "can be payed out at the end":
switchAccount(host)
await startContract()
await provider.advanceTimeTo(await storage.proofEnd(slotId))
await storage.payoutSlot(request.id, 0.u256)