UNPKG

@ethereum-sourcify/compilers

Version:

Wrapper around multiple compilers to download the right version and invoke the compilation with a common interface.

32 lines 1.49 kB
import { SolidityJsonInput, SolidityOutput } from '@ethereum-sourcify/compilers-types'; export declare function findSolcPlatform(): string | false; /** * Searches for a solc: first for a local executable version, then from HOST_SOLC_REPO * and then using the getSolcJs function. * Once the compiler is retrieved, it is used, and the stringified solc output is returned. * * @param version the version of solc to be used for compilation * @param input a JSON object of the standard-json format compatible with solc * @param log the logger * @returns stringified solc output */ export declare function useSolidityCompiler(solcRepoPath: string, solJsonRepoPath: string, version: string, solcJsonInput: SolidityJsonInput, forceEmscripten?: boolean): Promise<SolidityOutput>; export declare function getSolcExecutable(solcRepoPath: string, platform: string, version: string): Promise<string | null>; /** * Fetches the requested version of the Solidity compiler (soljson). * First attempts to search locally; if that fails, falls back to downloading it. * * @param version the solc version to retrieve: the expected format is * * "[v]<major>.<minor>.<patch>+commit.<hash>" * * e.g.: "0.6.6+commit.6c089d02" * * defaults to "latest" * * @param log a logger to track the course of events * * @returns the requested solc instance */ export declare function getSolcJs(solJsonRepoPath: string, version: string): Promise<any>; //# sourceMappingURL=solidityCompiler.d.ts.map