diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-02-10 05:20:15 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:16 +0800 |
commit | edf837ed622d782e43b0d25dd46a27469b9b0381 (patch) | |
tree | a53e4b40f1b4aae9ae80b42e2ab998b105358539 /packages/contracts/util | |
parent | 7201a74aeaa6b646e97d7c9c2c4cc979ace5f4f7 (diff) | |
download | dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.gz dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.bz2 dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.lz dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.xz dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.zst dexon-0x-contracts-edf837ed622d782e43b0d25dd46a27469b9b0381.zip |
Add logDecoder, remove outdated tests
Diffstat (limited to 'packages/contracts/util')
-rw-r--r-- | packages/contracts/util/signed_order_utils.ts | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/packages/contracts/util/signed_order_utils.ts b/packages/contracts/util/signed_order_utils.ts deleted file mode 100644 index 3e5d2f226..000000000 --- a/packages/contracts/util/signed_order_utils.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { SignedOrder } from '0x.js'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import ethUtil = require('ethereumjs-util'); -import * as _ from 'lodash'; - -import { crypto } from './crypto'; - -export const signedOrderUtils = { - createFill: ( - signedOrder: SignedOrder, - takerTokenFillAmount?: BigNumber, - ) => { - const fill = { - ...signedOrderUtils.getOrderAddressesAndValues(signedOrder), - takerTokenFillAmount: takerTokenFillAmount || signedOrder.takerTokenAmount, - ...signedOrder.ecSignature, - }; - return fill; - }, - createCancel(signedOrder: SignedOrder, takerTokenCancelAmount?: BigNumber) { - const cancel = { - ...signedOrderUtils.getOrderAddressesAndValues(signedOrder), - takerTokenCancelAmount: takerTokenCancelAmount || signedOrder.takerTokenAmount, - }; - return cancel; - }, - getOrderAddressesAndValues(signedOrder: SignedOrder) { - return { - orderAddresses: [ - signedOrder.maker, - signedOrder.taker, - signedOrder.makerTokenAddress, - signedOrder.takerTokenAddress, - signedOrder.feeRecipient, - ], - orderValues: [ - signedOrder.makerTokenAmount, - signedOrder.takerTokenAmount, - signedOrder.makerFee, - signedOrder.takerFee, - signedOrder.expirationUnixTimestampSec, - signedOrder.salt, - ], - }; - }, -}; |