aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src/utils/order_utils.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-05-11 05:22:49 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-05-19 08:01:05 +0800
commit9b1015bbce81b3f2a245e3dab6eea7c9028ce93b (patch)
tree3c698977176d907e04a8cfe0716f5d1f36167398 /packages/contracts/src/utils/order_utils.ts
parenta4c821eb60c227df4512d6c24ce0e5239b8bb6ce (diff)
downloaddexon-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.ts9
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;
+ },
};