import type { CompilerInput, SolcConfig } from "hardhat/types"; import { CompilerPlatform } from "hardhat/internal/solidity/compiler/downloader"; export interface ResolcConfig { version: string; compilerSource?: "binary" | "npm"; settings?: { basePath?: string; includePaths?: string[]; allowPaths?: string; optimizer?: { enabled?: boolean; parameters?: "0" | "1" | "2" | "3" | "s" | "z"; fallbackOz?: boolean; runs?: number; }; solcPath?: string; debugOutputDir?: string; resolcPath?: string; contractsToCompile?: string[]; emitDourceDebugInfo?: boolean; memoryConfig?: { heapSize?: number; stackSize?: number; }; }; } export interface TargetVM { target?: "evm" | "pvm"; } export interface ReviveCompilerInput extends CompilerInput { suppressedWarnings?: string[]; suppressedErrors?: string[]; } export interface MissingLibrary { contractName: string; contractPath: string; missingLibraries: string[]; } export interface SolcConfigData { compiler: SolcConfig; file?: string; } export interface ContractSource { [key: string]: object; } export interface Sources { [key: string]: { id: number; ast: object; }; } export interface ResolcBuild { version: string; longVersion: string; resolcPath: string; isJs: boolean; } export interface ICompiler { compile(input: CompilerInput, config: ResolcConfig): Promise; } export declare enum CompilerName { LINUX = "resolc-x86_64-unknown-linux-musl", WINDOWS = "resolc-x86_64-pc-windows-msvc.exe", MACOS = "resolc-universal-apple-darwin", WASM = "resolc.wasm" } export interface ResolcCompiler { version: string; longVersion: string; resolcPath: string; isJs: boolean; } export interface CompilerBuild { name: CompilerName; path: string; version: string; build: string; longVersion: string; sha256: string; platform: CompilerPlatform; } export interface CompilerList { builds: CompilerBuild[]; releases: { [version: string]: string; }; latestRelease: string; }