aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/sol-compiler/src')
-rw-r--r--packages/sol-compiler/src/compiler.ts3
-rw-r--r--packages/sol-compiler/src/index.ts3
-rw-r--r--packages/sol-compiler/src/monorepo_scripts/postpublish.ts8
-rw-r--r--packages/sol-compiler/src/monorepo_scripts/stage_docs.ts8
-rw-r--r--packages/sol-compiler/src/utils/compiler.ts2
-rw-r--r--packages/sol-compiler/src/utils/types.ts46
6 files changed, 4 insertions, 66 deletions
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index 2e7120361..7c76f3e52 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -10,6 +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 * as ethUtil from 'ethereumjs-util';
import * as fs from 'fs';
import * as _ from 'lodash';
@@ -29,7 +30,6 @@ import {
} from './utils/compiler';
import { constants } from './utils/constants';
import { fsWrapper } from './utils/fs_wrapper';
-import { CompilerOptions, ContractArtifact, ContractVersionData } from './utils/types';
import { utils } from './utils/utils';
type TYPE_ALL_FILES_IDENTIFIER = '*';
@@ -112,6 +112,7 @@ export class Compiler {
}
/**
* Instantiates a new instance of the Compiler class.
+ * @param opts Optional compiler options
* @return An instance of the Compiler class.
*/
constructor(opts?: CompilerOptions) {
diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts
index 15c166992..b6b170508 100644
--- a/packages/sol-compiler/src/index.ts
+++ b/packages/sol-compiler/src/index.ts
@@ -1,3 +1,2 @@
export { Compiler } from './compiler';
-export { CompilerOptions } from './utils/types';
-export { ContractArtifact, ContractNetworks } from './utils/types';
+export { CompilerOptions, CompilerSettings, OutputField } from 'ethereum-types';
diff --git a/packages/sol-compiler/src/monorepo_scripts/postpublish.ts b/packages/sol-compiler/src/monorepo_scripts/postpublish.ts
deleted file mode 100644
index dcb99d0f7..000000000
--- a/packages/sol-compiler/src/monorepo_scripts/postpublish.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { postpublishUtils } from '@0xproject/monorepo-scripts';
-
-import * as packageJSON from '../package.json';
-import * as tsConfigJSON from '../tsconfig.json';
-
-const cwd = `${__dirname}/..`;
-// tslint:disable-next-line:no-floating-promises
-postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd);
diff --git a/packages/sol-compiler/src/monorepo_scripts/stage_docs.ts b/packages/sol-compiler/src/monorepo_scripts/stage_docs.ts
deleted file mode 100644
index e732ac8eb..000000000
--- a/packages/sol-compiler/src/monorepo_scripts/stage_docs.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { postpublishUtils } from '@0xproject/monorepo-scripts';
-
-import * as packageJSON from '../package.json';
-import * as tsConfigJSON from '../tsconfig.json';
-
-const cwd = `${__dirname}/..`;
-// tslint:disable-next-line:no-floating-promises
-postpublishUtils.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd);
diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts
index 968fcc5b2..c918ed1f3 100644
--- a/packages/sol-compiler/src/utils/compiler.ts
+++ b/packages/sol-compiler/src/utils/compiler.ts
@@ -1,10 +1,10 @@
import { ContractSource } from '@0xproject/sol-resolver';
import { logUtils } from '@0xproject/utils';
+import { ContractArtifact } from 'ethereum-types';
import * as _ from 'lodash';
import * as path from 'path';
import { fsWrapper } from './fs_wrapper';
-import { ContractArtifact } from './types';
/**
* Gets contract data on network or returns if an artifact does not exist.
diff --git a/packages/sol-compiler/src/utils/types.ts b/packages/sol-compiler/src/utils/types.ts
index 4321a2235..b211cfcbc 100644
--- a/packages/sol-compiler/src/utils/types.ts
+++ b/packages/sol-compiler/src/utils/types.ts
@@ -1,5 +1,3 @@
-import * as solc from 'solc';
-
export enum AbiType {
Function = 'function',
Constructor = 'constructor',
@@ -7,54 +5,10 @@ export enum AbiType {
Fallback = 'fallback',
}
-export interface ContractArtifact extends ContractVersionData {
- schemaVersion: string;
- contractName: string;
- networks: ContractNetworks;
-}
-
-export interface ContractVersionData {
- compiler: {
- name: 'solc';
- version: string;
- settings: solc.CompilerSettings;
- };
- sources: {
- [sourceName: string]: {
- id: number;
- };
- };
- sourceCodes: {
- [sourceName: string]: string;
- };
- sourceTreeHashHex: string;
- compilerOutput: solc.StandardContractOutput;
-}
-
-export interface ContractNetworks {
- [networkId: number]: ContractNetworkData;
-}
-
-export interface ContractNetworkData {
- address: string;
- links: {
- [linkName: string]: string;
- };
- constructorArgs: string;
-}
-
export interface SolcErrors {
[key: string]: boolean;
}
-export interface CompilerOptions {
- contractsDir?: string;
- artifactsDir?: string;
- compilerSettings?: solc.CompilerSettings;
- contracts?: string[] | '*';
- solcVersion?: string;
-}
-
export interface ContractSourceData {
[contractName: string]: ContractSpecificSourceData;
}