Eric Mastro 88caa011b6
[rest api] fix purchases documentation
Documentation in the REST OpenAPI spec were showing incorrect information about Purchasing endpoints.

Update the open api spec to reflect information about purchases, not requests.
2023-03-22 16:49:41 +11:00

14 lines
580 B
Nim

import pkg/ethers
proc currentTime*(provider: Provider): Future[UInt256] {.async.} =
return (!await provider.getBlock(BlockTag.latest)).timestamp
proc advanceTime*(provider: JsonRpcProvider, seconds: UInt256) {.async.} =
discard await provider.send("evm_increaseTime", @[%seconds])
discard await provider.send("evm_mine")
proc advanceTimeTo*(provider: JsonRpcProvider, timestamp: UInt256) {.async.} =
if (await provider.currentTime()) != timestamp:
discard await provider.send("evm_setNextBlockTimestamp", @[%timestamp])
discard await provider.send("evm_mine")