diff options
-rw-r--r-- | packages/order-utils/src/asset_data_utils.ts | 9 | ||||
-rw-r--r-- | packages/typescript-typings/types/ethereumjs-abi/index.d.ts | 7 |
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[]; +} |