1 |
|
2 | export interface NetworksUserConfig {
|
3 | hardhat?: HardhatNetworkUserConfig;
|
4 | [networkName: string]: NetworkUserConfig | undefined;
|
5 | }
|
6 | export type NetworkUserConfig = HardhatNetworkUserConfig | HttpNetworkUserConfig;
|
7 | export interface HardforkHistoryUserConfig {
|
8 | [hardforkName: string]: number;
|
9 | }
|
10 | export interface HardhatNetworkChainUserConfig {
|
11 | hardforkHistory?: HardforkHistoryUserConfig;
|
12 | }
|
13 | export interface HardhatNetworkChainsUserConfig {
|
14 | [chainId: number]: HardhatNetworkChainUserConfig;
|
15 | }
|
16 | export 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 | }
|
39 | export type HardhatNetworkAccountsUserConfig = HardhatNetworkAccountUserConfig[] | HardhatNetworkHDAccountsUserConfig;
|
40 | export interface HardhatNetworkAccountUserConfig {
|
41 | privateKey: string;
|
42 | balance: string;
|
43 | }
|
44 | export interface HardhatNetworkHDAccountsUserConfig {
|
45 | mnemonic?: string;
|
46 | initialIndex?: number;
|
47 | count?: number;
|
48 | path?: string;
|
49 | accountsBalance?: string;
|
50 | passphrase?: string;
|
51 | }
|
52 | export interface HDAccountsUserConfig {
|
53 | mnemonic: string;
|
54 | initialIndex?: number;
|
55 | count?: number;
|
56 | path?: string;
|
57 | passphrase?: string;
|
58 | }
|
59 | export interface HardhatNetworkForkingUserConfig {
|
60 | enabled?: boolean;
|
61 | url: string;
|
62 | blockNumber?: number;
|
63 | httpHeaders?: {
|
64 | [name: string]: string;
|
65 | };
|
66 | }
|
67 | export type HttpNetworkAccountsUserConfig = "remote" | string[] | HDAccountsUserConfig;
|
68 | export 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 | }
|
81 | export interface NetworksConfig {
|
82 | hardhat: HardhatNetworkConfig;
|
83 | localhost: HttpNetworkConfig;
|
84 | [networkName: string]: NetworkConfig;
|
85 | }
|
86 | export type NetworkConfig = HardhatNetworkConfig | HttpNetworkConfig;
|
87 | export type HardforkHistoryConfig = Map<string, number>;
|
88 | export interface HardhatNetworkChainConfig {
|
89 | hardforkHistory: HardforkHistoryConfig;
|
90 | }
|
91 | export type HardhatNetworkChainsConfig = Map<number, HardhatNetworkChainConfig>;
|
92 | export 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 | }
|
115 | export type HardhatNetworkAccountsConfig = HardhatNetworkHDAccountsConfig | HardhatNetworkAccountConfig[];
|
116 | export interface HardhatNetworkAccountConfig {
|
117 | privateKey: string;
|
118 | balance: string;
|
119 | }
|
120 | export interface HardhatNetworkHDAccountsConfig {
|
121 | mnemonic: string;
|
122 | initialIndex: number;
|
123 | count: number;
|
124 | path: string;
|
125 | accountsBalance: string;
|
126 | passphrase: string;
|
127 | }
|
128 | export interface HardhatNetworkForkingConfig {
|
129 | enabled: boolean;
|
130 | url: string;
|
131 | blockNumber?: number;
|
132 | httpHeaders?: {
|
133 | [name: string]: string;
|
134 | };
|
135 | }
|
136 | export 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 | }
|
149 | export type HttpNetworkAccountsConfig = "remote" | string[] | HttpNetworkHDAccountsConfig;
|
150 | export interface HttpNetworkHDAccountsConfig {
|
151 | mnemonic: string;
|
152 | initialIndex: number;
|
153 | count: number;
|
154 | path: string;
|
155 | passphrase: string;
|
156 | }
|
157 | export interface HardhatNetworkMiningConfig {
|
158 | auto: boolean;
|
159 | interval: number | [number, number];
|
160 | mempool: HardhatNetworkMempoolConfig;
|
161 | }
|
162 | export interface HardhatNetworkMiningUserConfig {
|
163 | auto?: boolean;
|
164 | interval?: number | [number, number];
|
165 | mempool?: HardhatNetworkMempoolUserConfig;
|
166 | }
|
167 | export interface HardhatNetworkMempoolConfig {
|
168 | order: string;
|
169 | }
|
170 | export interface HardhatNetworkMempoolUserConfig {
|
171 | order?: string;
|
172 | }
|
173 | export interface ProjectPathsUserConfig {
|
174 | root?: string;
|
175 | cache?: string;
|
176 | artifacts?: string;
|
177 | sources?: string;
|
178 | tests?: string;
|
179 | }
|
180 | export interface ProjectPathsConfig {
|
181 | root: string;
|
182 | configFile: string;
|
183 | cache: string;
|
184 | artifacts: string;
|
185 | sources: string;
|
186 | tests: string;
|
187 | }
|
188 | export type SolidityUserConfig = string | SolcUserConfig | MultiSolcUserConfig;
|
189 | export interface SolcUserConfig {
|
190 | version: string;
|
191 | settings?: any;
|
192 | }
|
193 | export interface MultiSolcUserConfig {
|
194 | compilers: SolcUserConfig[];
|
195 | overrides?: Record<string, SolcUserConfig>;
|
196 | }
|
197 | export interface SolcConfig {
|
198 | version: string;
|
199 | settings: any;
|
200 | }
|
201 | export interface SolidityConfig {
|
202 | compilers: SolcConfig[];
|
203 | overrides: Record<string, SolcConfig>;
|
204 | }
|
205 | export interface HardhatUserConfig {
|
206 | defaultNetwork?: string;
|
207 | paths?: ProjectPathsUserConfig;
|
208 | networks?: NetworksUserConfig;
|
209 | solidity?: SolidityUserConfig;
|
210 | mocha?: Mocha.MochaOptions;
|
211 | }
|
212 | export interface HardhatConfig {
|
213 | defaultNetwork: string;
|
214 | paths: ProjectPathsConfig;
|
215 | networks: NetworksConfig;
|
216 | solidity: SolidityConfig;
|
217 | mocha: Mocha.MochaOptions;
|
218 | }
|
219 | export type ConfigExtender = (config: HardhatConfig, userConfig: Readonly<HardhatUserConfig>) => void;
|
220 |
|
\ | No newline at end of file |