This repository has been archived by the owner on Jul 9, 2021. It is now read-only.
orderbook: Make OrderStore async for use in db adapter #2393
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We want to adapt the orderstore to fetch from a local database rather than in-memory for usage with 0x API and AssetSwapper. 0xProject/0x-api#33
As such this change moves a number of
OrderStore
functions to be async. This is not a directly used class and all ofOrderBook
functions are alreadyasync
. As areOrderSet
since it calculatesorderHash
async.Also fixes an issue in
asset-swapper
where the gas price estimate from ethgastation is in gwei. All calculations based off of that result in gwei as well. This is results in an underfundedprotocolFee
when a real gas price is used (8 gwei in wei rather than 8 wei).TODO