Merge pull request #482 from 0xProject/feature/web3-types
Move common types out of web3 types
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user