aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/util
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-02-10 05:20:15 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-21 04:56:16 +0800
commitedf837ed622d782e43b0d25dd46a27469b9b0381 (patch)
treea53e4b40f1b4aae9ae80b42e2ab998b105358539 /packages/contracts/util
parent7201a74aeaa6b646e97d7c9c2c4cc979ace5f4f7 (diff)
downloaddexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.gz
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.bz2
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.lz
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.xz
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.tar.zst
dexon-sol-tools-edf837ed622d782e43b0d25dd46a27469b9b0381.zip
Add logDecoder, remove outdated tests
Diffstat (limited to 'packages/contracts/util')
-rw-r--r--packages/contracts/util/signed_order_utils.ts47
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,
- ],
- };
- },
-};