hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
45 lines • 2.07 kB
TypeScript
import type { SuiteResult } from "@nomicfoundation/edr";
export declare const SNAPSHOT_CHEATCODES_DIR = "snapshots";
export type SnapshotCheatcodesMap = Map<string, // group
Record<string, // name
string>>;
export type SnapshotCheatcodesWithMetadataMap = Map<string, // group
Record<string, // name
{
value: string;
metadata: {
source: string;
};
}>>;
export interface SnapshotCheatcode {
group: string;
name: string;
value: string;
}
export interface SnapshotCheatcodeChange {
group: string;
name: string;
expected: number;
actual: number;
source: string;
}
export interface SnapshotCheatcodesComparison {
added: SnapshotCheatcode[];
removed: SnapshotCheatcode[];
changed: SnapshotCheatcodeChange[];
}
export interface SnapshotCheatcodesCheckResult {
passed: boolean;
comparison: SnapshotCheatcodesComparison;
written: boolean;
}
export declare function getSnapshotCheatcodesPath(basePath: string, filename: string): string;
export declare function extractSnapshotCheatcodes(suiteResults: SuiteResult[]): SnapshotCheatcodesWithMetadataMap;
export declare function writeSnapshotCheatcodes(basePath: string, snapshotCheatcodes: SnapshotCheatcodesWithMetadataMap): Promise<void>;
export declare function readSnapshotCheatcodes(basePath: string): Promise<SnapshotCheatcodesMap>;
export declare function stringifySnapshotCheatcodes(snapshots: SnapshotCheatcode[]): string;
export declare function compareSnapshotCheatcodes(previousSnapshotsMap: SnapshotCheatcodesMap, currentSnapshotsMap: SnapshotCheatcodesWithMetadataMap): SnapshotCheatcodesComparison;
export declare function checkSnapshotCheatcodes(basePath: string, suiteResults: SuiteResult[]): Promise<SnapshotCheatcodesCheckResult>;
export declare function logSnapshotCheatcodesSection(result: SnapshotCheatcodesCheckResult, logger?: typeof console.log): void;
export declare function printSnapshotCheatcodeChanges(changes: SnapshotCheatcodeChange[], logger?: typeof console.log): void;
//# sourceMappingURL=snapshot-cheatcodes.d.ts.map