hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
71 lines • 2.89 kB
JavaScript
class LazySolidityBuildSystem {
constructor(hooks, options) {
this.
this.
}
async getRootFilePaths(options = {}) {
const buildSystem = await this.
return buildSystem.getRootFilePaths(options);
}
async getScope(fsPath) {
const buildSystem = await this.
return buildSystem.getScope(fsPath);
}
async build(rootFiles, options) {
const buildSystem = await this.
return buildSystem.build(rootFiles, options);
}
async getCompilationJobs(rootFiles, options) {
const buildSystem = await this.
return buildSystem.getCompilationJobs(rootFiles, options);
}
async runCompilationJob(compilationJob, options) {
const buildSystem = await this.
return buildSystem.runCompilationJob(compilationJob, options);
}
async remapCompilerError(compilationJob, error, shouldShortenPaths) {
const buildSystem = await this.
return buildSystem.remapCompilerError(compilationJob, error, shouldShortenPaths);
}
async emitArtifacts(compilationJob, compilerOutput, options = {}) {
const buildSystem = await this.
return buildSystem.emitArtifacts(compilationJob, compilerOutput, options);
}
async cleanupArtifacts(rootFilePaths, options = {}) {
const buildSystem = await this.
return buildSystem.cleanupArtifacts(rootFilePaths, options);
}
async compileBuildInfo(buildInfo, options) {
const buildSystem = await this.
return buildSystem.compileBuildInfo(buildInfo, options);
}
async getArtifactsDirectory(scope) {
const buildSystem = await this.
return buildSystem.getArtifactsDirectory(scope);
}
async
const { SolidityBuildSystemImplementation } = await import("../build-system/build-system.js");
if (this.
this.
}
return this.
}
}
export default async () => {
return {
created: async (_context, hre) => {
hre.solidity = new LazySolidityBuildSystem(hre.hooks, {
solidityConfig: hre.config.solidity,
projectRoot: hre.config.paths.root,
soliditySourcesPaths: hre.config.paths.sources.solidity,
artifactsPath: hre.config.paths.artifacts,
cachePath: hre.config.paths.cache,
solidityTestsPath: hre.config.paths.tests.solidity,
});
},
};
};
//# sourceMappingURL=hre.js.map