UNPKG

6.49 kBTypeScriptView Raw
1/// <reference types="mocha" />
2export interface NetworksUserConfig {
3 hardhat?: HardhatNetworkUserConfig;
4 [networkName: string]: NetworkUserConfig | undefined;
5}
6export type NetworkUserConfig = HardhatNetworkUserConfig | HttpNetworkUserConfig;
7export interface HardforkHistoryUserConfig {
8 [hardforkName: string]: number;
9}
10export interface HardhatNetworkChainUserConfig {
11 hardforkHistory?: HardforkHistoryUserConfig;
12}
13export interface HardhatNetworkChainsUserConfig {
14 [chainId: number]: HardhatNetworkChainUserConfig;
15}
16export interface HardhatNetworkUserConfig {
17 chainId?: number;
18 from?: string;
19 gas?: "auto" | number;
20 gasPrice?: "auto" | number;
21 gasMultiplier?: number;
22 initialBaseFeePerGas?: number;
23 hardfork?: string;
24 mining?: HardhatNetworkMiningUserConfig;
25 accounts?: HardhatNetworkAccountsUserConfig;
26 blockGasLimit?: number;
27 minGasPrice?: number | string;
28 throwOnTransactionFailures?: boolean;
29 throwOnCallFailures?: boolean;
30 allowUnlimitedContractSize?: boolean;
31 allowBlocksWithSameTimestamp?: boolean;
32 initialDate?: string;
33 loggingEnabled?: boolean;
34 forking?: HardhatNetworkForkingUserConfig;
35 coinbase?: string;
36 chains?: HardhatNetworkChainsUserConfig;
37 enableTransientStorage?: boolean;
38}
39export type HardhatNetworkAccountsUserConfig = HardhatNetworkAccountUserConfig[] | HardhatNetworkHDAccountsUserConfig;
40export interface HardhatNetworkAccountUserConfig {
41 privateKey: string;
42 balance: string;
43}
44export interface HardhatNetworkHDAccountsUserConfig {
45 mnemonic?: string;
46 initialIndex?: number;
47 count?: number;
48 path?: string;
49 accountsBalance?: string;
50 passphrase?: string;
51}
52export interface HDAccountsUserConfig {
53 mnemonic: string;
54 initialIndex?: number;
55 count?: number;
56 path?: string;
57 passphrase?: string;
58}
59export interface HardhatNetworkForkingUserConfig {
60 enabled?: boolean;
61 url: string;
62 blockNumber?: number;
63 httpHeaders?: {
64 [name: string]: string;
65 };
66}
67export type HttpNetworkAccountsUserConfig = "remote" | string[] | HDAccountsUserConfig;
68export interface HttpNetworkUserConfig {
69 chainId?: number;
70 from?: string;
71 gas?: "auto" | number;
72 gasPrice?: "auto" | number;
73 gasMultiplier?: number;
74 url?: string;
75 timeout?: number;
76 httpHeaders?: {
77 [name: string]: string;
78 };
79 accounts?: HttpNetworkAccountsUserConfig;
80}
81export interface NetworksConfig {
82 hardhat: HardhatNetworkConfig;
83 localhost: HttpNetworkConfig;
84 [networkName: string]: NetworkConfig;
85}
86export type NetworkConfig = HardhatNetworkConfig | HttpNetworkConfig;
87export type HardforkHistoryConfig = Map<string, number>;
88export interface HardhatNetworkChainConfig {
89 hardforkHistory: HardforkHistoryConfig;
90}
91export type HardhatNetworkChainsConfig = Map<number, HardhatNetworkChainConfig>;
92export interface HardhatNetworkConfig {
93 chainId: number;
94 from?: string;
95 gas: "auto" | number;
96 gasPrice: "auto" | number;
97 gasMultiplier: number;
98 initialBaseFeePerGas?: number;
99 hardfork: string;
100 mining: HardhatNetworkMiningConfig;
101 accounts: HardhatNetworkAccountsConfig;
102 blockGasLimit: number;
103 minGasPrice: bigint;
104 throwOnTransactionFailures: boolean;
105 throwOnCallFailures: boolean;
106 allowUnlimitedContractSize: boolean;
107 initialDate: string;
108 loggingEnabled: boolean;
109 forking?: HardhatNetworkForkingConfig;
110 coinbase?: string;
111 chains: HardhatNetworkChainsConfig;
112 allowBlocksWithSameTimestamp?: boolean;
113 enableTransientStorage?: boolean;
114}
115export type HardhatNetworkAccountsConfig = HardhatNetworkHDAccountsConfig | HardhatNetworkAccountConfig[];
116export interface HardhatNetworkAccountConfig {
117 privateKey: string;
118 balance: string;
119}
120export interface HardhatNetworkHDAccountsConfig {
121 mnemonic: string;
122 initialIndex: number;
123 count: number;
124 path: string;
125 accountsBalance: string;
126 passphrase: string;
127}
128export interface HardhatNetworkForkingConfig {
129 enabled: boolean;
130 url: string;
131 blockNumber?: number;
132 httpHeaders?: {
133 [name: string]: string;
134 };
135}
136export interface HttpNetworkConfig {
137 chainId?: number;
138 from?: string;
139 gas: "auto" | number;
140 gasPrice: "auto" | number;
141 gasMultiplier: number;
142 url: string;
143 timeout: number;
144 httpHeaders: {
145 [name: string]: string;
146 };
147 accounts: HttpNetworkAccountsConfig;
148}
149export type HttpNetworkAccountsConfig = "remote" | string[] | HttpNetworkHDAccountsConfig;
150export interface HttpNetworkHDAccountsConfig {
151 mnemonic: string;
152 initialIndex: number;
153 count: number;
154 path: string;
155 passphrase: string;
156}
157export interface HardhatNetworkMiningConfig {
158 auto: boolean;
159 interval: number | [number, number];
160 mempool: HardhatNetworkMempoolConfig;
161}
162export interface HardhatNetworkMiningUserConfig {
163 auto?: boolean;
164 interval?: number | [number, number];
165 mempool?: HardhatNetworkMempoolUserConfig;
166}
167export interface HardhatNetworkMempoolConfig {
168 order: string;
169}
170export interface HardhatNetworkMempoolUserConfig {
171 order?: string;
172}
173export interface ProjectPathsUserConfig {
174 root?: string;
175 cache?: string;
176 artifacts?: string;
177 sources?: string;
178 tests?: string;
179}
180export interface ProjectPathsConfig {
181 root: string;
182 configFile: string;
183 cache: string;
184 artifacts: string;
185 sources: string;
186 tests: string;
187}
188export type SolidityUserConfig = string | SolcUserConfig | MultiSolcUserConfig;
189export interface SolcUserConfig {
190 version: string;
191 settings?: any;
192}
193export interface MultiSolcUserConfig {
194 compilers: SolcUserConfig[];
195 overrides?: Record<string, SolcUserConfig>;
196}
197export interface SolcConfig {
198 version: string;
199 settings: any;
200}
201export interface SolidityConfig {
202 compilers: SolcConfig[];
203 overrides: Record<string, SolcConfig>;
204}
205export interface HardhatUserConfig {
206 defaultNetwork?: string;
207 paths?: ProjectPathsUserConfig;
208 networks?: NetworksUserConfig;
209 solidity?: SolidityUserConfig;
210 mocha?: Mocha.MochaOptions;
211}
212export interface HardhatConfig {
213 defaultNetwork: string;
214 paths: ProjectPathsConfig;
215 networks: NetworksConfig;
216 solidity: SolidityConfig;
217 mocha: Mocha.MochaOptions;
218}
219export type ConfigExtender = (config: HardhatConfig, userConfig: Readonly<HardhatUserConfig>) => void;
220//# sourceMappingURL=config.d.ts.map
\No newline at end of file