From 72b2a1c66fa9fb85ea8515645b97332eee204550 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 18 Apr 2018 22:22:39 +0200 Subject: Implement new artifacts format --- packages/typescript-typings/types/solc/index.d.ts | 70 ++++++++++++----------- 1 file changed, 36 insertions(+), 34 deletions(-) (limited to 'packages/typescript-typings/types/solc') diff --git a/packages/typescript-typings/types/solc/index.d.ts b/packages/typescript-typings/types/solc/index.d.ts index b20f9b2ff..5a87ac267 100644 --- a/packages/typescript-typings/types/solc/index.d.ts +++ b/packages/typescript-typings/types/solc/index.d.ts @@ -59,32 +59,33 @@ declare module 'solc' { | 'evm.gasEstimates' | 'ewasm.wast' | 'ewasm.wasm'; + export interface CompilerSettings { + remappings?: string[]; + optimizer?: { + enabled: boolean; + runs?: number; + }; + evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; + metadata?: { + useLiteralContent: true; + }; + libraries?: { + [fileName: string]: { + [libName: string]: string; + }; + }; + outputSelection: { + [fileName: string]: { + [contractName: string]: OutputField[]; + }; + }; + } export interface StandardInput { language: 'Solidity' | 'serpent' | 'lll' | 'assembly'; sources: { [fileName: string]: Source; }; - settings: { - remappings?: string[]; - optimizer?: { - enabled: boolean; - runs?: number; - }; - evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; - metadata?: { - useLiteralContent: true; - }; - libraries?: { - [fileName: string]: { - [libName: string]: string; - }; - }; - outputSelection: { - [fileName: string]: { - [contractName: string]: OutputField[]; - }; - }; - }; + settings: CompilerSettings; } export type ErrorType = | 'JSONError' @@ -114,6 +115,19 @@ declare module 'solc' { formattedMessage?: string; } import { ContractAbi } from '@0xproject/types'; + export interface StandardContractOutput { + abi: ContractAbi; + evm: { + bytecode: { + object: string; + sourceMap: string; + }; + deployedBytecode: { + object: string; + sourceMap: string; + }; + }; + } export interface StandardOutput { errors: Error[]; sources: { @@ -125,19 +139,7 @@ declare module 'solc' { }; contracts: { [fileName: string]: { - [contractName: string]: { - abi: ContractAbi; - evm: { - bytecode: { - object: string; - sourceMap: string; - }; - deployedBytecode: { - object: string; - sourceMap: string; - }; - }; - }; + [contractName: string]: StandardContractOutput; }; }; } -- cgit v1.2.3