UNPKG

1.25 kBTypeScriptView Raw
1import { Artifact } from "../types";
2/**
3 * Retrieves an artifact for the given `contractName` from the compilation output.
4 *
5 * @param contractName the contract's name.
6 * @param contractOutput the contract's compilation output as emitted by `solc`.
7 */
8export declare function getArtifactFromContractOutput(contractName: string, contractOutput: any): Artifact;
9/**
10 * Stores an artifact in the given path.
11 *
12 * @param artifactsPath the artifacts' directory.
13 * @param artifact the artifact to be stored.
14 */
15export declare function saveArtifact(artifactsPath: string, artifact: Artifact): Promise<void>;
16/**
17 * Asynchronically reads an artifact with the given `contractName` from the given `artifactPath`.
18 *
19 * @param artifactsPath the artifacts' directory.
20 * @param contractName the contract's name.
21 */
22export declare function readArtifact(artifactsPath: string, contractName: string): Promise<Artifact>;
23/**
24 * Synchronically reads an artifact with the given `contractName` from the given `artifactPath`.
25 *
26 * @param artifactsPath the artifacts directory.
27 * @param contractName the contract's name.
28 */
29export declare function readArtifactSync(artifactsPath: string, contractName: string): Artifact;
30//# sourceMappingURL=artifacts.d.ts.map
\No newline at end of file