diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-07 18:18:53 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-07 18:18:53 +0800 |
commit | 0fc981400442e4c567ca363bdf0f4c03ba87473d (patch) | |
tree | ee19dfb9dcd9c631fa4138326b9d639a7fc7374e /packages/sol-compiler/src | |
parent | e617da3bbf650b25c29df33cd12e23c994efe674 (diff) | |
parent | e0bc01eea1c20e0afda296f331c6a475e062b59c (diff) | |
download | dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar.gz dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar.bz2 dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar.lz dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar.xz dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.tar.zst dexon-sol-tools-0fc981400442e4c567ca363bdf0f4c03ba87473d.zip |
merge v2-prototype
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r-- | packages/sol-compiler/src/cli.ts | 7 | ||||
-rw-r--r-- | packages/sol-compiler/src/compiler.ts | 17 | ||||
-rw-r--r-- | packages/sol-compiler/src/utils/compiler.ts | 4 | ||||
-rw-r--r-- | packages/sol-compiler/src/utils/types.ts | 3 |
4 files changed, 4 insertions, 27 deletions
diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts index b97cf4cab..8901c0a31 100644 --- a/packages/sol-compiler/src/cli.ts +++ b/packages/sol-compiler/src/cli.ts @@ -1,16 +1,11 @@ #!/usr/bin/env node // We need the above pragma since this script will be run as a command-line tool. -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { logUtils } from '@0xproject/utils'; import * as _ from 'lodash'; -import * as path from 'path'; -import * as Web3 from 'web3'; import * as yargs from 'yargs'; import { Compiler } from './compiler'; -import { constants } from './utils/constants'; -import { CompilerOptions } from './utils/types'; const DEFAULT_CONTRACTS_LIST = '*'; const SEPARATOR = ','; diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index d2dda75ea..bb701a8ce 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -1,8 +1,5 @@ import { assert } from '@0xproject/assert'; import { - ContractSource, - ContractSources, - EnumerableResolver, FallthroughResolver, FSResolver, NameResolver, @@ -11,9 +8,8 @@ import { Resolver, URLResolver, } from '@0xproject/sol-resolver'; -import { logUtils, promisify } from '@0xproject/utils'; +import { logUtils } from '@0xproject/utils'; import chalk from 'chalk'; -import { ContractAbi } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; import * as fs from 'fs'; import 'isomorphic-fetch'; @@ -34,15 +30,7 @@ import { } from './utils/compiler'; import { constants } from './utils/constants'; import { fsWrapper } from './utils/fs_wrapper'; -import { - CompilerOptions, - ContractArtifact, - ContractNetworkData, - ContractNetworks, - ContractSourceData, - ContractSpecificSourceData, - ContractVersionData, -} from './utils/types'; +import { CompilerOptions, ContractArtifact, ContractVersionData } from './utils/types'; import { utils } from './utils/utils'; type TYPE_ALL_FILES_IDENTIFIER = '*'; @@ -172,7 +160,6 @@ export class Compiler { const solcInstance = solc.setupMethods(requireFromString(solcjs, compilerBinFilename)); logUtils.log(`Compiling ${contractName} with Solidity v${solcVersion}...`); - const source = contractSource.source; const standardInput: solc.StandardInput = { language: 'Solidity', sources: { diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts index 715ecd6f0..08e2d999a 100644 --- a/packages/sol-compiler/src/utils/compiler.ts +++ b/packages/sol-compiler/src/utils/compiler.ts @@ -1,10 +1,8 @@ -import { ContractSource, ContractSources } from '@0xproject/sol-resolver'; +import { ContractSource } from '@0xproject/sol-resolver'; import { logUtils } from '@0xproject/utils'; import * as _ from 'lodash'; import * as path from 'path'; -import * as solc from 'solc'; -import { constants } from './constants'; import { fsWrapper } from './fs_wrapper'; import { ContractArtifact } from './types'; diff --git a/packages/sol-compiler/src/utils/types.ts b/packages/sol-compiler/src/utils/types.ts index 759a7a555..4321a2235 100644 --- a/packages/sol-compiler/src/utils/types.ts +++ b/packages/sol-compiler/src/utils/types.ts @@ -1,7 +1,4 @@ -import { ContractAbi, Provider, TxData } from 'ethereum-types'; import * as solc from 'solc'; -import * as Web3 from 'web3'; -import * as yargs from 'yargs'; export enum AbiType { Function = 'function', |