hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
35 lines • 1.7 kB
TypeScript
import type { CompilerInput, CompilerOutput } from "../../../../../types/solidity/compiler-io.js";
import type { Compiler } from "../../../../../types/solidity/compiler.js";
/**
* Spawns a compilation process and returns its output.
*
* It pipes the stdout of the compilation process to a temporary file to avoid exceeding
* the maximum buffer size. It later reads the file as stream to parse it into a CompilerOutput.
*
* It also pipes the stderr of the compilation process to the stderr of the main process.
*
* @param command The compilation command to run
* @param args The arguments to pass to the compilation command
* @param input The solc input to pass to the compilation command on stdin
* @returns The compilation output
* @throws Error if the compilation process exits with a non-zero exit code.
* @throws HardhatInvariantError if the any of the io streams are null.
*/
export declare function spawnCompile(command: string, args: string[], input: CompilerInput): Promise<CompilerOutput>;
export declare class SolcJsCompiler implements Compiler {
readonly version: string;
readonly longVersion: string;
readonly compilerPath: string;
readonly isSolcJs = true;
constructor(version: string, longVersion: string, compilerPath: string);
compile(input: CompilerInput): Promise<CompilerOutput>;
}
export declare class NativeCompiler implements Compiler {
readonly version: string;
readonly longVersion: string;
readonly compilerPath: string;
readonly isSolcJs = false;
constructor(version: string, longVersion: string, compilerPath: string);
compile(input: CompilerInput): Promise<CompilerOutput>;
}
//# sourceMappingURL=compiler.d.ts.map