diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-05-11 05:22:49 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-05-19 08:01:05 +0800 |
commit | 9b1015bbce81b3f2a245e3dab6eea7c9028ce93b (patch) | |
tree | 3c698977176d907e04a8cfe0716f5d1f36167398 /packages/contracts/src/utils/order_utils.ts | |
parent | a4c821eb60c227df4512d6c24ce0e5239b8bb6ce (diff) | |
download | dexon-0x-contracts-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.tar.gz dexon-0x-contracts-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.tar.zst dexon-0x-contracts-9b1015bbce81b3f2a245e3dab6eea7c9028ce93b.zip |
Atomic Order Matching - Tests
Diffstat (limited to 'packages/contracts/src/utils/order_utils.ts')
-rw-r--r-- | packages/contracts/src/utils/order_utils.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/contracts/src/utils/order_utils.ts b/packages/contracts/src/utils/order_utils.ts index 10bbf4f7c..7a482ad9e 100644 --- a/packages/contracts/src/utils/order_utils.ts +++ b/packages/contracts/src/utils/order_utils.ts @@ -80,4 +80,13 @@ export const orderUtils = { const orderHashHex = `0x${orderHashBuff.toString('hex')}`; return orderHashHex; }, + createMatchOrders(signedOrderLeft: SignedOrder, signedOrderRight: SignedOrder) { + const fill = { + left: orderUtils.getOrderStruct(signedOrderLeft), + right: orderUtils.getOrderStruct(signedOrderRight), + leftSignature: signedOrderLeft.signature, + rightSignature: signedOrderRight.signature, + }; + return fill; + }, }; |