hardhat
Version:
Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
90 lines (80 loc) • 2.35 kB
text/typescript
import "../../../types/config.js";
import type {
SensitiveString,
ResolvedConfigurationVariable,
} from "../../../types/config.js";
declare module "../../../types/config.js" {
export interface TestPathsUserConfig {
solidity?: string;
}
export interface TestPathsConfig {
solidity: string;
}
}
declare module "../../../types/test.js" {
export interface SolidityTestConfigBase {
timeout?: number;
fsPermissions?: {
readWriteFile?: string[];
readFile?: string[];
writeFile?: string[];
dangerouslyReadWriteDirectory?: string[];
readDirectory?: string[];
dangerouslyWriteDirectory?: string[];
};
isolate?: boolean;
ffi?: boolean;
allowInternalExpectRevert?: boolean;
from?: string; // 0x-prefixed hex string
txOrigin?: string; // 0x-prefixed hex string
initialBalance?: bigint;
blockBaseFeePerGas?: bigint;
coinbase?: string; // 0x-prefixed hex string
blockTimestamp?: bigint;
prevRandao?: bigint;
blockGasLimit?: bigint | false;
fuzz?: {
failurePersistDir?: string;
failurePersistFile?: string;
runs?: number;
maxTestRejects?: number;
seed?: string;
dictionaryWeight?: number;
includeStorage?: boolean;
includePushBytes?: boolean;
};
invariant?: {
failurePersistDir?: string;
runs?: number;
depth?: number;
failOnRevert?: boolean;
callOverride?: boolean;
dictionaryWeight?: number;
includeStorage?: boolean;
includePushBytes?: boolean;
shrinkRunLimit?: number;
};
}
export interface SolidityTestForkingUserConfig {
url?: SensitiveString;
blockNumber?: bigint;
rpcEndpoints?: Record<string, SensitiveString>;
}
export interface SolidityTestUserConfig extends SolidityTestConfigBase {
forking?: SolidityTestForkingUserConfig;
}
export interface HardhatTestUserConfig {
solidity?: SolidityTestUserConfig;
}
export interface SolidityTestForkingConfig {
url?: ResolvedConfigurationVariable;
blockNumber?: bigint;
rpcEndpoints?: Record<string, ResolvedConfigurationVariable>;
}
export interface SolidityTestConfig extends SolidityTestConfigBase {
forking?: SolidityTestForkingConfig;
}
export interface HardhatTestConfig {
solidity: SolidityTestConfig;
}
}