Merge pull request #159 from 0xProject/fix/types

Move Aftifact type definition to 'types'
This commit is contained in:
Leonid
2017-09-07 20:31:20 +02:00
committed by GitHub
5 changed files with 10 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
import {Artifact} from './types';
import * as TokenArtifact from './artifacts/Token.json';
import * as ExchangeArtifact from './artifacts/Exchange.json';
import * as EtherTokenArtifact from './artifacts/EtherToken.json';

View File

@@ -1,7 +1,7 @@
import * as _ from 'lodash';
import * as Web3 from 'web3';
import {Web3Wrapper} from '../web3_wrapper';
import {ZeroExError} from '../types';
import {ZeroExError, Artifact} from '../types';
import {utils} from '../utils/utils';
export class ContractWrapper {

7
src/globals.d.ts vendored
View File

@@ -33,13 +33,6 @@ declare module '*.json' {
/* tslint:enable */
}
declare interface Artifact {
abi: any;
networks: {[networkId: number]: {
address: string;
}};
}
// find-version declarations
declare function findVersions(version: string): string[];
declare module 'find-versions' {

View File

@@ -412,3 +412,10 @@ export interface LogWithDecodedArgs extends Web3.LogEntry, DecodedArgs {}
export interface TransactionReceiptWithDecodedLogs extends Web3.TransactionReceipt {
logs: Array<LogWithDecodedArgs|Web3.LogEntry>;
}
export interface Artifact {
abi: any;
networks: {[networkId: number]: {
address: string;
}};
}

View File

@@ -2,7 +2,7 @@ import * as _ from 'lodash';
import * as Web3 from 'web3';
import * as BigNumber from 'bignumber.js';
import promisify = require('es6-promisify');
import {ZeroExError} from './types';
import {ZeroExError, Artifact} from './types';
import {Contract} from './contract';
export class Web3Wrapper {