From d72b7299c66ea6d63eb14595b06456c02b2ad99b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 27 Mar 2018 15:19:23 +0200 Subject: Move common types out of web3 types --- packages/contracts/util/multi_sig_wrapper.ts | 5 +++-- packages/contracts/util/types.ts | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'packages/contracts') diff --git a/packages/contracts/util/multi_sig_wrapper.ts b/packages/contracts/util/multi_sig_wrapper.ts index 3b83ccb7b..9f6dcec52 100644 --- a/packages/contracts/util/multi_sig_wrapper.ts +++ b/packages/contracts/util/multi_sig_wrapper.ts @@ -1,3 +1,4 @@ +import { AbiDefinition, MethodAbi } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import ABI = require('ethereumjs-abi'); import ethUtil = require('ethereumjs-util'); @@ -10,8 +11,8 @@ import { TransactionDataParams } from './types'; export class MultiSigWrapper { private _multiSig: MultiSigWalletContract; - public static encodeFnArgs(name: string, abi: Web3.AbiDefinition[], args: any[]) { - const abiEntity = _.find(abi, { name }) as Web3.MethodAbi; + public static encodeFnArgs(name: string, abi: AbiDefinition[], args: any[]) { + const abiEntity = _.find(abi, { name }) as MethodAbi; if (_.isUndefined(abiEntity)) { throw new Error(`Did not find abi entry for name: ${name}`); } diff --git a/packages/contracts/util/types.ts b/packages/contracts/util/types.ts index 61a19acb4..321084c42 100644 --- a/packages/contracts/util/types.ts +++ b/packages/contracts/util/types.ts @@ -1,5 +1,5 @@ +import { AbiDefinition, ContractAbi } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; -import * as Web3 from 'web3'; export interface BalancesByOwner { [ownerAddress: string]: { @@ -51,7 +51,7 @@ export interface DefaultOrderParams { export interface TransactionDataParams { name: string; - abi: Web3.AbiDefinition[]; + abi: AbiDefinition[]; args: any[]; } @@ -105,7 +105,7 @@ export interface Artifact { contract_name: ContractName; networks: { [networkId: number]: { - abi: Web3.ContractAbi; + abi: ContractAbi; solc_version: string; keccak256: string; optimizer_enabled: number; -- cgit