aboutsummaryrefslogtreecommitdiffstats
path: root/packages/deployer/src/utils/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/deployer/src/utils/types.ts')
-rw-r--r--packages/deployer/src/utils/types.ts53
1 files changed, 32 insertions, 21 deletions
diff --git a/packages/deployer/src/utils/types.ts b/packages/deployer/src/utils/types.ts
index a20d0f627..19c27df67 100644
--- a/packages/deployer/src/utils/types.ts
+++ b/packages/deployer/src/utils/types.ts
@@ -1,4 +1,5 @@
import { ContractAbi, Provider, TxData } from '@0xproject/types';
+import * as solc from 'solc';
import * as Web3 from 'web3';
import * as yargs from 'yargs';
@@ -9,28 +10,40 @@ export enum AbiType {
Fallback = 'fallback',
}
-export interface ContractArtifact {
- contract_name: string;
+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 {
- [key: number]: ContractNetworkData;
+ [networkId: number]: ContractNetworkData;
}
export interface ContractNetworkData {
- solc_version: string;
- optimizer_enabled: boolean;
- source_tree_hash: string;
- abi: ContractAbi;
- bytecode: string;
- runtime_bytecode: string;
- address?: string;
- constructor_args?: string;
- updated_at: number;
- source_map: string;
- source_map_runtime: string;
- sources: string[];
+ address: string;
+ links: {
+ [linkName: string]: string;
+ };
+ constructorArgs: string;
}
export interface SolcErrors {
@@ -42,7 +55,6 @@ export interface CliOptions extends yargs.Arguments {
contractsDir: string;
jsonrpcUrl: string;
networkId: number;
- shouldOptimize: boolean;
gasPrice: string;
account?: string;
contract?: string;
@@ -50,11 +62,10 @@ export interface CliOptions extends yargs.Arguments {
}
export interface CompilerOptions {
- contractsDir: string;
- networkId: number;
- optimizerEnabled: boolean;
- artifactsDir: string;
- specifiedContracts: Set<string>;
+ contractsDir?: string;
+ artifactsDir?: string;
+ compilerSettings?: solc.CompilerSettings;
+ contracts?: string[] | '*';
}
export interface BaseDeployerOptions {