aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
authorF. Eugene Aumson <gene@aumson.org>2018-08-24 21:18:33 +0800
committerF. Eugene Aumson <gene@aumson.org>2018-08-29 20:51:01 +0800
commita1959df911741d0424a952fa4a63c5dcc1135524 (patch)
tree61a9682aa21143a98f00a67c98558a6a3f962f74 /packages/sol-compiler/src
parent775d1efd4607a4097704fe3c4f7ae1156b2c1a6f (diff)
downloaddexon-0x-contracts-a1959df911741d0424a952fa4a63c5dcc1135524.tar.gz
dexon-0x-contracts-a1959df911741d0424a952fa4a63c5dcc1135524.tar.zst
dexon-0x-contracts-a1959df911741d0424a952fa4a63c5dcc1135524.zip
add devdoc support to solc typings, and use it
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r--packages/sol-compiler/src/compiler.ts11
-rw-r--r--packages/sol-compiler/src/index.ts21
2 files changed, 24 insertions, 8 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index 91b17c4f2..b5255b361 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -10,7 +10,7 @@ import {
} from '@0xproject/sol-resolver';
import { fetchAsync, logUtils } from '@0xproject/utils';
import chalk from 'chalk';
-import { CompilerOptions, ContractArtifact, ContractVersionData } from 'ethereum-types';
+import { CompilerOptions, ContractArtifact, ContractVersionData, StandardOutput } from 'ethereum-types';
import * as ethUtil from 'ethereumjs-util';
import * as fs from 'fs';
import * as _ from 'lodash';
@@ -169,7 +169,7 @@ export class Compiler {
* each element contains the output for all of the modules compiled with
* that version.
*/
- public async getCompilerOutputsAsync(): Promise<solc.StandardOutput[]> {
+ public async getCompilerOutputsAsync(): Promise<StandardOutput[]> {
return this._compileContractsAsync(this._getContractNamesToCompile(), false);
}
private _getContractNamesToCompile(): string[] {
@@ -187,10 +187,7 @@ export class Compiler {
* @param fileName Name of contract with '.sol' extension.
* @return an array of compiler outputs, where each element corresponds to a different version of solc-js.
*/
- private async _compileContractsAsync(
- contractNames: string[],
- shouldPersist: boolean,
- ): Promise<solc.StandardOutput[]> {
+ private async _compileContractsAsync(contractNames: string[], shouldPersist: boolean): Promise<StandardOutput[]> {
// batch input contracts together based on the version of the compiler that they require.
const versionToInputs: VersionToInputs = {};
@@ -231,7 +228,7 @@ export class Compiler {
versionToInputs[solcVersion].contractsToCompile.push(contractSource.path);
}
- const compilerOutputs: solc.StandardOutput[] = [];
+ const compilerOutputs: StandardOutput[] = [];
const solcVersions = _.keys(versionToInputs);
for (const solcVersion of solcVersions) {
diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts
index 1ad07a9ff..829e515ff 100644
--- a/packages/sol-compiler/src/index.ts
+++ b/packages/sol-compiler/src/index.ts
@@ -1,9 +1,28 @@
export { Compiler } from './compiler';
export {
+ AbiDefinition,
CompilerOptions,
CompilerSettings,
+ DataItem,
+ DevdocOutput,
+ ErrorSeverity,
+ ErrorType,
+ EventAbi,
+ EventParameter,
+ EvmBytecodeOutput,
+ EvmOutput,
+ FallbackAbi,
+ FunctionAbi,
+ MethodAbi,
+ ConstructorAbi,
+ ConstructorStateMutability,
+ ContractAbi,
OutputField,
CompilerSettingsMetadata,
OptimizerSettings,
+ ParamDescription,
+ SolcError,
+ StandardContractOutput,
+ StandardOutput,
+ StateMutability,
} from 'ethereum-types';
-export { StandardOutput } from 'solc';