hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
60 lines • 2.46 kB
JavaScript
class LazyArtifactManager {
constructor(artifactsPath) {
this.
this.
}
async readArtifact(contractNameOrFullyQualifiedName) {
const artifactManager = await this.
return artifactManager.readArtifact(contractNameOrFullyQualifiedName);
}
async getArtifactPath(contractNameOrFullyQualifiedName) {
const artifactManager = await this.
return artifactManager.getArtifactPath(contractNameOrFullyQualifiedName);
}
async artifactExists(contractNameOrFullyQualifiedName) {
const artifactManager = await this.
return artifactManager.artifactExists(contractNameOrFullyQualifiedName);
}
async getAllFullyQualifiedNames() {
const artifactManager = await this.
return artifactManager.getAllFullyQualifiedNames();
}
async getBuildInfoId(contractNameOrFullyQualifiedName) {
const artifactManager = await this.
return artifactManager.getBuildInfoId(contractNameOrFullyQualifiedName);
}
async getAllBuildInfoIds() {
const artifactManager = await this.
return artifactManager.getAllBuildInfoIds();
}
async getBuildInfoPath(buildInfoId) {
const artifactManager = await this.
return artifactManager.getBuildInfoPath(buildInfoId);
}
async getBuildInfoOutputPath(buildInfoId) {
const artifactManager = await this.
return artifactManager.getBuildInfoOutputPath(buildInfoId);
}
async clearCache() {
const artifactManager = await this.
return artifactManager.clearCache();
}
async
if (this.
const { ArtifactManagerImplementation } = await import("../artifact-manager.js");
this.
}
return this.
}
}
export default async () => {
const handlers = {
created: async (_context, hre) => {
hre.artifacts = new LazyArtifactManager(hre.config.paths.artifacts);
},
};
return handlers;
};
//# sourceMappingURL=hre.js.map