diff options
Diffstat (limited to 'packages/deployer/src/utils')
-rw-r--r-- | packages/deployer/src/utils/constants.ts | 2 | ||||
-rw-r--r-- | packages/deployer/src/utils/types.ts | 25 | ||||
-rw-r--r-- | packages/deployer/src/utils/utils.ts | 5 |
3 files changed, 18 insertions, 14 deletions
diff --git a/packages/deployer/src/utils/constants.ts b/packages/deployer/src/utils/constants.ts index 57f30dec8..6f9dfb994 100644 --- a/packages/deployer/src/utils/constants.ts +++ b/packages/deployer/src/utils/constants.ts @@ -1,4 +1,4 @@ export const constants = { - NULL_BYTES: '0x', SOLIDITY_FILE_EXTENSION: '.sol', + BASE_COMPILER_URL: 'https://ethereum.github.io/solc-bin/bin/', }; diff --git a/packages/deployer/src/utils/types.ts b/packages/deployer/src/utils/types.ts index a3f722976..0068faf6a 100644 --- a/packages/deployer/src/utils/types.ts +++ b/packages/deployer/src/utils/types.ts @@ -24,10 +24,14 @@ export interface ContractNetworkData { keccak256: string; source_tree_hash: string; abi: Web3.ContractAbi; - unlinked_binary: string; + bytecode: string; + runtime_bytecode: string; address?: string; constructor_args?: string; updated_at: number; + source_map: string; + source_map_runtime: string; + sources: string[]; } export interface SolcErrors { @@ -37,7 +41,7 @@ export interface SolcErrors { export interface CliOptions extends yargs.Arguments { artifactsDir: string; contractsDir: string; - jsonrpcPort: number; + jsonrpcUrl: string; networkId: number; shouldOptimize: boolean; gasPrice: string; @@ -54,13 +58,22 @@ export interface CompilerOptions { specifiedContracts: Set<string>; } -export interface DeployerOptions { +export interface BaseDeployerOptions { artifactsDir: string; - jsonrpcPort: number; networkId: number; defaults: Partial<TxData>; } +export interface ProviderDeployerOptions extends BaseDeployerOptions { + web3Provider: Web3.Provider; +} + +export interface UrlDeployerOptions extends BaseDeployerOptions { + jsonrpcUrl: string; +} + +export type DeployerOptions = UrlDeployerOptions | ProviderDeployerOptions; + export interface ContractSources { [key: string]: string; } @@ -76,10 +89,6 @@ export interface ContractSpecificSourceData { sourceTreeHashIfExists?: Buffer; } -export interface ImportContents { - contents: string; -} - // TODO: Consolidate with 0x.js definitions once types are moved into a separate package. export enum ZeroExError { ContractDoesNotExist = 'CONTRACT_DOES_NOT_EXIST', diff --git a/packages/deployer/src/utils/utils.ts b/packages/deployer/src/utils/utils.ts index 4390d8813..9b1e59f9d 100644 --- a/packages/deployer/src/utils/utils.ts +++ b/packages/deployer/src/utils/utils.ts @@ -1,9 +1,4 @@ export const utils = { - consoleLog(message: string): void { - /* tslint:disable */ - console.log(message); - /* tslint:enable */ - }, stringifyWithFormatting(obj: any): string { const jsonReplacer: null = null; const numberOfJsonSpaces = 4; |