hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
14 lines (12 loc) • 404 B
text/typescript
import { InternalError } from "../../../core/providers/errors";
export function assertHardhatNetworkInvariant(
invariant: boolean,
description: string
): asserts invariant {
if (!invariant) {
// eslint-disable-next-line @nomicfoundation/hardhat-internal-rules/only-hardhat-error
throw new InternalError(
`Internal Hardhat Network invariant was violated: ${description}`
);
}
}