aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-17 22:01:01 +0800
committerFabio Berger <me@fabioberger.com>2018-07-17 22:01:01 +0800
commit83f3ba21b8543788b9405801da465fcda8f05f79 (patch)
tree954b61a4f679991df556d4e122ed41676d66088c
parent1de70e447458d4913a293dda04315ec53d9c7ffe (diff)
downloaddexon-0x-contracts-83f3ba21b8543788b9405801da465fcda8f05f79.tar.gz
dexon-0x-contracts-83f3ba21b8543788b9405801da465fcda8f05f79.tar.zst
dexon-0x-contracts-83f3ba21b8543788b9405801da465fcda8f05f79.zip
Move type decl. to typescript-typings
-rw-r--r--packages/order-utils/src/asset_data_utils.ts9
-rw-r--r--packages/typescript-typings/types/ethereumjs-abi/index.d.ts7
2 files changed, 8 insertions, 8 deletions
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts
index 81e34218f..6a4e7600d 100644
--- a/packages/order-utils/src/asset_data_utils.ts
+++ b/packages/order-utils/src/asset_data_utils.ts
@@ -1,18 +1,11 @@
import { AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import BN = require('bn.js');
+import ethAbi = require('ethereumjs-abi');
import ethUtil = require('ethereumjs-util');
import { constants } from './constants';
-// TODO: Push upstream to DefinitelyTyped
-interface EthAbi {
- simpleEncode(signature: string, ...args: any[]): Buffer;
- rawDecode(signature: string[], data: Buffer): any[];
-}
-// tslint:disable:no-var-requires
-const ethAbi = require('ethereumjs-abi') as EthAbi;
-
export const assetDataUtils = {
encodeUint256(value: BigNumber): Buffer {
const base = 10;
diff --git a/packages/typescript-typings/types/ethereumjs-abi/index.d.ts b/packages/typescript-typings/types/ethereumjs-abi/index.d.ts
new file mode 100644
index 000000000..af8630c2d
--- /dev/null
+++ b/packages/typescript-typings/types/ethereumjs-abi/index.d.ts
@@ -0,0 +1,7 @@
+declare module 'ethereumjs-util' {
+ export function soliditySHA3(argTypes: string[], args: any[]): Buffer;
+ export function soliditySHA256(argTypes: string[], args: any[]): Buffer;
+ export function methodID(name: string, types: string[]): Buffer;
+ export function simpleEncode(signature: string, ...args: any[]): Buffer;
+ export function rawDecode(signature: string[], data: Buffer): any[];
+}