-
Notifications
You must be signed in to change notification settings - Fork 465
Batch Order Matching #1900
Batch Order Matching #1900
Conversation
36fed4d
to
4c21215
Compare
9be6e56
to
c0196d8
Compare
Due to the fact that ZEIP 40 addresses several of the issues in this ZEIP, more tests for |
4a24d52
to
e24c55d
Compare
f484c88
to
5735e29
Compare
Co-Authored-By: Lawrence Forman <lawrence@0xproject.com>
3abb6cc
to
cff710c
Compare
cff710c
to
bbd5b86
Compare
const _initialTokenBalances = initialTokenBalances | ||
? initialTokenBalances | ||
: await this._initialTokenBalancesPromise; | ||
// Execute `batchMatchOrders()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right before this, can we do an exchangeWrapper.getBatchMatchOrdersResultsAsync()
and assert the results against the simulation? I don't see where we are checking the return value of batchMatchOrders()
anywhere.
Would also be nice to have this done for the regular matchOrders()
tests, as well.
); | ||
} | ||
} | ||
// TODO(jalextowle): Implement the same as the above for ERC1155 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have any matchOrders
coverage for 1155s? Let's add an asana task for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll check and get back to you.
Description
This PR partially address ZEIP 41.
Batch Order Matching
These changes add a
batchMatchOrders
function, which allows several orders to be matched in a single transaction. This implementation can easily be modified to also meet the requirements forbatchMatchOrdersWithMaximalFill
as soon as ZEIP 40 is implemented.Simulating Batch Order Matching
A
batchMatchOrdersAndAssertEffectsAsync
function was added to facilitate testing the newbatchMatchOrders
function, and in the process I was able to refactor some of thematch_order_tester.ts
file to be more general.Testing instructions
yarn build:contracts && yarn test:contracts && yarn lint:contracts
Types of changes
Checklist:
[WIP]
if necessary.