prool 0.0.25 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE → LICENSE.md} +1 -1
- package/README.md +46 -163
- package/{_lib/instance.d.ts → dist/Instance.d.ts} +28 -25
- package/dist/Instance.d.ts.map +1 -0
- package/{_lib/instance.js → dist/Instance.js} +9 -4
- package/dist/Instance.js.map +1 -0
- package/{_lib/pool.d.ts → dist/Pool.d.ts} +15 -13
- package/dist/Pool.d.ts.map +1 -0
- package/{_lib/pool.js → dist/Pool.js} +3 -3
- package/dist/Pool.js.map +1 -0
- package/{_lib/server.d.ts → dist/Server.d.ts} +7 -10
- package/dist/Server.d.ts.map +1 -0
- package/{_lib/server.js → dist/Server.js} +8 -9
- package/dist/Server.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/instances/alto.d.ts +452 -0
- package/dist/instances/alto.d.ts.map +1 -0
- package/{_lib → dist}/instances/alto.js +4 -4
- package/dist/instances/alto.js.map +1 -0
- package/dist/instances/anvil.d.ts +458 -0
- package/dist/instances/anvil.d.ts.map +1 -0
- package/{_lib → dist}/instances/anvil.js +4 -4
- package/dist/instances/anvil.js.map +1 -0
- package/dist/instances/tempo.d.ts +189 -0
- package/dist/instances/tempo.d.ts.map +1 -0
- package/dist/instances/tempo.js +200 -0
- package/dist/instances/tempo.js.map +1 -0
- package/{_lib → dist/internal}/utils.d.ts +5 -5
- package/dist/internal/utils.d.ts.map +1 -0
- package/{_lib → dist/internal}/utils.js +37 -7
- package/dist/internal/utils.js.map +1 -0
- package/{_lib → dist}/processes/execa.d.ts +11 -10
- package/dist/processes/execa.d.ts.map +1 -0
- package/{_lib → dist}/processes/execa.js +1 -1
- package/dist/processes/execa.js.map +1 -0
- package/package.json +17 -16
- package/{instance.test.ts → src/Instance.test.ts} +12 -12
- package/{instance.ts → src/Instance.ts} +51 -42
- package/{pool.test.ts → src/Pool.test.ts} +41 -55
- package/{pool.ts → src/Pool.ts} +21 -19
- package/{server.test.ts → src/Server.test.ts} +26 -149
- package/{server.ts → src/Server.ts} +9 -11
- package/src/index.ts +3 -0
- package/{instances → src/instances}/alto.test.ts +8 -11
- package/src/instances/alto.ts +289 -0
- package/{instances → src/instances}/anvil.test.ts +5 -6
- package/src/instances/anvil.ts +306 -0
- package/{instances/silius.test.ts → src/instances/tempo.test.ts} +20 -44
- package/src/instances/tempo.ts +322 -0
- package/{utils.test.ts → src/internal/utils.test.ts} +20 -6
- package/{utils.ts → src/internal/utils.ts} +47 -17
- package/{processes → src/processes}/execa.test.ts +6 -11
- package/{processes → src/processes}/execa.ts +19 -15
- package/src/processes/index.ts +1 -0
- package/CHANGELOG.md +0 -154
- package/_lib/exports/index.d.ts +0 -5
- package/_lib/exports/index.d.ts.map +0 -1
- package/_lib/exports/index.js +0 -5
- package/_lib/exports/index.js.map +0 -1
- package/_lib/exports/instances.d.ts +0 -7
- package/_lib/exports/instances.d.ts.map +0 -1
- package/_lib/exports/instances.js +0 -7
- package/_lib/exports/instances.js.map +0 -1
- package/_lib/exports/processes.d.ts +0 -2
- package/_lib/exports/processes.d.ts.map +0 -1
- package/_lib/exports/processes.js +0 -2
- package/_lib/exports/processes.js.map +0 -1
- package/_lib/instance.d.ts.map +0 -1
- package/_lib/instance.js.map +0 -1
- package/_lib/instances/alto.d.ts +0 -449
- package/_lib/instances/alto.d.ts.map +0 -1
- package/_lib/instances/alto.js.map +0 -1
- package/_lib/instances/anvil.d.ts +0 -455
- package/_lib/instances/anvil.d.ts.map +0 -1
- package/_lib/instances/anvil.js.map +0 -1
- package/_lib/instances/rundler.d.ts +0 -604
- package/_lib/instances/rundler.d.ts.map +0 -1
- package/_lib/instances/rundler.js +0 -86
- package/_lib/instances/rundler.js.map +0 -1
- package/_lib/instances/silius.d.ts +0 -224
- package/_lib/instances/silius.d.ts.map +0 -1
- package/_lib/instances/silius.js +0 -117
- package/_lib/instances/silius.js.map +0 -1
- package/_lib/instances/stackup.d.ts +0 -86
- package/_lib/instances/stackup.d.ts.map +0 -1
- package/_lib/instances/stackup.js +0 -89
- package/_lib/instances/stackup.js.map +0 -1
- package/_lib/pool.d.ts.map +0 -1
- package/_lib/pool.js.map +0 -1
- package/_lib/processes/execa.d.ts.map +0 -1
- package/_lib/processes/execa.js.map +0 -1
- package/_lib/server.d.ts.map +0 -1
- package/_lib/server.js.map +0 -1
- package/_lib/utils.d.ts.map +0 -1
- package/_lib/utils.js.map +0 -1
- package/exports/index.test.ts +0 -16
- package/exports/index.ts +0 -29
- package/exports/instances.test.ts +0 -15
- package/exports/instances.ts +0 -13
- package/exports/processes.test.ts +0 -10
- package/exports/processes.ts +0 -8
- package/instances/alto.ts +0 -280
- package/instances/anvil.ts +0 -304
- package/instances/package.json +0 -5
- package/instances/rundler.test.ts +0 -111
- package/instances/rundler.ts +0 -451
- package/instances/silius.ts +0 -347
- package/instances/stackup.test.ts +0 -106
- package/instances/stackup.ts +0 -162
- package/processes/package.json +0 -5
- package/tsconfig.build.tsbuildinfo +0 -1
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import * as Instance from '../Instance.js';
|
|
2
|
+
/**
|
|
3
|
+
* Defines an Anvil instance.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const instance = Instance.anvil({ forkRpcUrl: 'https://cloudflare-eth.com', port: 8546 })
|
|
8
|
+
* await instance.start()
|
|
9
|
+
* // ...
|
|
10
|
+
* await instance.stop()
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare const anvil: Instance.define.ReturnType<{
|
|
14
|
+
args: {
|
|
15
|
+
/**
|
|
16
|
+
* Number of dev accounts to generate and configure.
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue 10
|
|
19
|
+
*/
|
|
20
|
+
accounts?: number | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Set the Access-Control-Allow-Origin response header (CORS).
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue *
|
|
25
|
+
*/
|
|
26
|
+
allowOrigin?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Enable autoImpersonate on startup
|
|
29
|
+
*/
|
|
30
|
+
autoImpersonate?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The balance of every dev account in Ether.
|
|
33
|
+
*
|
|
34
|
+
* @defaultValue 10000
|
|
35
|
+
*/
|
|
36
|
+
balance?: number | bigint | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The base fee in a block.
|
|
39
|
+
*/
|
|
40
|
+
blockBaseFeePerGas?: number | bigint | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Block time in seconds for interval mining.
|
|
43
|
+
*/
|
|
44
|
+
blockTime?: number | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The chain id.
|
|
47
|
+
*/
|
|
48
|
+
chainId?: number | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* EIP-170: Contract code size limit in bytes. Useful to increase this because of tests.
|
|
51
|
+
*
|
|
52
|
+
* @defaultValue 0x6000 (~25kb)
|
|
53
|
+
*/
|
|
54
|
+
codeSizeLimit?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Sets the number of assumed available compute units per second for this fork provider.
|
|
57
|
+
*
|
|
58
|
+
* @defaultValue 350
|
|
59
|
+
* @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
|
|
60
|
+
*/
|
|
61
|
+
computeUnitsPerSecond?: number | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Writes output of `anvil` as json to user-specified file.
|
|
64
|
+
*/
|
|
65
|
+
configOut?: string | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the derivation path of the child key to be derived.
|
|
68
|
+
*
|
|
69
|
+
* @defaultValue m/44'/60'/0'/0/
|
|
70
|
+
*/
|
|
71
|
+
derivationPath?: string | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Disable the `call.gas_limit <= block.gas_limit` constraint.
|
|
74
|
+
*/
|
|
75
|
+
disableBlockGasLimit?: boolean | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Dump the state of chain on exit to the given file. If the value is a directory, the state will be
|
|
78
|
+
* written to `<VALUE>/state.json`.
|
|
79
|
+
*/
|
|
80
|
+
dumpState?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Fetch state over a remote endpoint instead of starting from an empty state.
|
|
83
|
+
*
|
|
84
|
+
* If you want to fetch state from a specific block number, add a block number like `http://localhost:8545@1400000`
|
|
85
|
+
* or use the `forkBlockNumber` option.
|
|
86
|
+
*/
|
|
87
|
+
forkUrl?: string | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Fetch state from a specific block number over a remote endpoint.
|
|
90
|
+
*
|
|
91
|
+
* Requires `forkUrl` to be set.
|
|
92
|
+
*/
|
|
93
|
+
forkBlockNumber?: number | bigint | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Specify chain id to skip fetching it from remote endpoint. This enables offline-start mode.
|
|
96
|
+
*
|
|
97
|
+
* You still must pass both `forkUrl` and `forkBlockNumber`, and already have your required state cached
|
|
98
|
+
* on disk, anything missing locally would be fetched from the remote.
|
|
99
|
+
*/
|
|
100
|
+
forkChainId?: number | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* Specify headers to send along with any request to the remote JSON-RPC server in forking mode.
|
|
103
|
+
*
|
|
104
|
+
* e.g. "User-Agent: test-agent"
|
|
105
|
+
*
|
|
106
|
+
* Requires `forkUrl` to be set.
|
|
107
|
+
*/
|
|
108
|
+
forkHeader?: Record<string, string> | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* Initial retry backoff on encountering errors.
|
|
111
|
+
*/
|
|
112
|
+
forkRetryBackoff?: number | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* The block gas limit.
|
|
115
|
+
*/
|
|
116
|
+
gasLimit?: number | bigint | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* The gas price.
|
|
119
|
+
*/
|
|
120
|
+
gasPrice?: number | bigint | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* The EVM hardfork to use.
|
|
123
|
+
*/
|
|
124
|
+
hardfork?: "Frontier" | "Homestead" | "Dao" | "Tangerine" | "SpuriousDragon" | "Byzantium" | "Constantinople" | "Petersburg" | "Istanbul" | "Muirglacier" | "Berlin" | "London" | "ArrowGlacier" | "GrayGlacier" | "Paris" | "Shanghai" | "Cancun" | "Prague" | "Latest" | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* The host the server will listen on.
|
|
127
|
+
*/
|
|
128
|
+
host?: string | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* Initialize the genesis block with the given `genesis.json` file.
|
|
131
|
+
*/
|
|
132
|
+
init?: string | undefined;
|
|
133
|
+
/**
|
|
134
|
+
* Launch an ipc server at the given path or default path = `/tmp/anvil.ipc`.
|
|
135
|
+
*/
|
|
136
|
+
ipc?: string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Initialize the chain from a previously saved state snapshot.
|
|
139
|
+
*/
|
|
140
|
+
loadState?: string | undefined;
|
|
141
|
+
/**
|
|
142
|
+
* BIP39 mnemonic phrase used for generating accounts.
|
|
143
|
+
*/
|
|
144
|
+
mnemonic?: string | undefined;
|
|
145
|
+
/**
|
|
146
|
+
* Automatically generates a BIP39 mnemonic phrase, and derives accounts from it.
|
|
147
|
+
*/
|
|
148
|
+
mnemonicRandom?: boolean | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Disable CORS.
|
|
151
|
+
*/
|
|
152
|
+
noCors?: boolean | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* Disable auto and interval mining, and mine on demand instead.
|
|
155
|
+
*/
|
|
156
|
+
noMining?: boolean | undefined;
|
|
157
|
+
/**
|
|
158
|
+
* Disables rate limiting for this node's provider.
|
|
159
|
+
*
|
|
160
|
+
* @defaultValue false
|
|
161
|
+
* @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
|
|
162
|
+
*/
|
|
163
|
+
noRateLimit?: boolean | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Explicitly disables the use of RPC caching.
|
|
166
|
+
*
|
|
167
|
+
* All storage slots are read entirely from the endpoint.
|
|
168
|
+
*/
|
|
169
|
+
noStorageCaching?: boolean | undefined;
|
|
170
|
+
/**
|
|
171
|
+
* How transactions are sorted in the mempool.
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue fees
|
|
174
|
+
*/
|
|
175
|
+
order?: string | undefined;
|
|
176
|
+
/**
|
|
177
|
+
* Run an Optimism chain.
|
|
178
|
+
*/
|
|
179
|
+
optimism?: boolean | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* Port number to listen on.
|
|
182
|
+
*
|
|
183
|
+
* @defaultValue 8545
|
|
184
|
+
*/
|
|
185
|
+
port?: number | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* Don't keep full chain history. If a number argument is specified, at most this number of states is kept in memory.
|
|
188
|
+
*/
|
|
189
|
+
pruneHistory?: number | undefined | boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Number of retry requests for spurious networks (timed out requests).
|
|
192
|
+
*
|
|
193
|
+
* @defaultValue 5
|
|
194
|
+
*/
|
|
195
|
+
retries?: number | undefined;
|
|
196
|
+
/**
|
|
197
|
+
* Don't print anything on startup and don't print logs.
|
|
198
|
+
*/
|
|
199
|
+
silent?: boolean | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* Slots in an epoch.
|
|
202
|
+
*/
|
|
203
|
+
slotsInAnEpoch?: number | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Enable steps tracing used for debug calls returning geth-style traces.
|
|
206
|
+
*/
|
|
207
|
+
stepsTracing?: boolean | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Interval in seconds at which the status is to be dumped to disk.
|
|
210
|
+
*/
|
|
211
|
+
stateInterval?: number | undefined;
|
|
212
|
+
/**
|
|
213
|
+
* This is an alias for both `loadState` and `dumpState`. It initializes the chain with the state stored at the
|
|
214
|
+
* file, if it exists, and dumps the chain's state on exit
|
|
215
|
+
*/
|
|
216
|
+
state?: string | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Timeout in ms for requests sent to remote JSON-RPC server in forking mode.
|
|
219
|
+
*
|
|
220
|
+
* @defaultValue 45000
|
|
221
|
+
*/
|
|
222
|
+
timeout?: number | undefined;
|
|
223
|
+
/**
|
|
224
|
+
* The timestamp of the genesis block.
|
|
225
|
+
*/
|
|
226
|
+
timestamp?: number | bigint | undefined;
|
|
227
|
+
/**
|
|
228
|
+
* Number of blocks with transactions to keep in memory.
|
|
229
|
+
*/
|
|
230
|
+
transactionBlockKeeper?: number | undefined;
|
|
231
|
+
};
|
|
232
|
+
readonly process: import("../processes/execa.js").Process_internal;
|
|
233
|
+
}, Instance.anvil.Parameters | undefined>;
|
|
234
|
+
export declare namespace anvil {
|
|
235
|
+
type Parameters = {
|
|
236
|
+
/**
|
|
237
|
+
* Number of dev accounts to generate and configure.
|
|
238
|
+
*
|
|
239
|
+
* @defaultValue 10
|
|
240
|
+
*/
|
|
241
|
+
accounts?: number | undefined;
|
|
242
|
+
/**
|
|
243
|
+
* Set the Access-Control-Allow-Origin response header (CORS).
|
|
244
|
+
*
|
|
245
|
+
* @defaultValue *
|
|
246
|
+
*/
|
|
247
|
+
allowOrigin?: string | undefined;
|
|
248
|
+
/**
|
|
249
|
+
* Enable autoImpersonate on startup
|
|
250
|
+
*/
|
|
251
|
+
autoImpersonate?: boolean | undefined;
|
|
252
|
+
/**
|
|
253
|
+
* The balance of every dev account in Ether.
|
|
254
|
+
*
|
|
255
|
+
* @defaultValue 10000
|
|
256
|
+
*/
|
|
257
|
+
balance?: number | bigint | undefined;
|
|
258
|
+
/**
|
|
259
|
+
* The base fee in a block.
|
|
260
|
+
*/
|
|
261
|
+
blockBaseFeePerGas?: number | bigint | undefined;
|
|
262
|
+
/**
|
|
263
|
+
* Block time in seconds for interval mining.
|
|
264
|
+
*/
|
|
265
|
+
blockTime?: number | undefined;
|
|
266
|
+
/**
|
|
267
|
+
* Path or alias to the Anvil binary.
|
|
268
|
+
*/
|
|
269
|
+
binary?: string | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* The chain id.
|
|
272
|
+
*/
|
|
273
|
+
chainId?: number | undefined;
|
|
274
|
+
/**
|
|
275
|
+
* EIP-170: Contract code size limit in bytes. Useful to increase this because of tests.
|
|
276
|
+
*
|
|
277
|
+
* @defaultValue 0x6000 (~25kb)
|
|
278
|
+
*/
|
|
279
|
+
codeSizeLimit?: number | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* Sets the number of assumed available compute units per second for this fork provider.
|
|
282
|
+
*
|
|
283
|
+
* @defaultValue 350
|
|
284
|
+
* @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
|
|
285
|
+
*/
|
|
286
|
+
computeUnitsPerSecond?: number | undefined;
|
|
287
|
+
/**
|
|
288
|
+
* Writes output of `anvil` as json to user-specified file.
|
|
289
|
+
*/
|
|
290
|
+
configOut?: string | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* Sets the derivation path of the child key to be derived.
|
|
293
|
+
*
|
|
294
|
+
* @defaultValue m/44'/60'/0'/0/
|
|
295
|
+
*/
|
|
296
|
+
derivationPath?: string | undefined;
|
|
297
|
+
/**
|
|
298
|
+
* Disable the `call.gas_limit <= block.gas_limit` constraint.
|
|
299
|
+
*/
|
|
300
|
+
disableBlockGasLimit?: boolean | undefined;
|
|
301
|
+
/**
|
|
302
|
+
* Dump the state of chain on exit to the given file. If the value is a directory, the state will be
|
|
303
|
+
* written to `<VALUE>/state.json`.
|
|
304
|
+
*/
|
|
305
|
+
dumpState?: string | undefined;
|
|
306
|
+
/**
|
|
307
|
+
* Fetch state over a remote endpoint instead of starting from an empty state.
|
|
308
|
+
*
|
|
309
|
+
* If you want to fetch state from a specific block number, add a block number like `http://localhost:8545@1400000`
|
|
310
|
+
* or use the `forkBlockNumber` option.
|
|
311
|
+
*/
|
|
312
|
+
forkUrl?: string | undefined;
|
|
313
|
+
/**
|
|
314
|
+
* Fetch state from a specific block number over a remote endpoint.
|
|
315
|
+
*
|
|
316
|
+
* Requires `forkUrl` to be set.
|
|
317
|
+
*/
|
|
318
|
+
forkBlockNumber?: number | bigint | undefined;
|
|
319
|
+
/**
|
|
320
|
+
* Specify chain id to skip fetching it from remote endpoint. This enables offline-start mode.
|
|
321
|
+
*
|
|
322
|
+
* You still must pass both `forkUrl` and `forkBlockNumber`, and already have your required state cached
|
|
323
|
+
* on disk, anything missing locally would be fetched from the remote.
|
|
324
|
+
*/
|
|
325
|
+
forkChainId?: number | undefined;
|
|
326
|
+
/**
|
|
327
|
+
* Specify headers to send along with any request to the remote JSON-RPC server in forking mode.
|
|
328
|
+
*
|
|
329
|
+
* e.g. "User-Agent: test-agent"
|
|
330
|
+
*
|
|
331
|
+
* Requires `forkUrl` to be set.
|
|
332
|
+
*/
|
|
333
|
+
forkHeader?: Record<string, string> | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Initial retry backoff on encountering errors.
|
|
336
|
+
*/
|
|
337
|
+
forkRetryBackoff?: number | undefined;
|
|
338
|
+
/**
|
|
339
|
+
* The block gas limit.
|
|
340
|
+
*/
|
|
341
|
+
gasLimit?: number | bigint | undefined;
|
|
342
|
+
/**
|
|
343
|
+
* The gas price.
|
|
344
|
+
*/
|
|
345
|
+
gasPrice?: number | bigint | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* The EVM hardfork to use.
|
|
348
|
+
*/
|
|
349
|
+
hardfork?: 'Frontier' | 'Homestead' | 'Dao' | 'Tangerine' | 'SpuriousDragon' | 'Byzantium' | 'Constantinople' | 'Petersburg' | 'Istanbul' | 'Muirglacier' | 'Berlin' | 'London' | 'ArrowGlacier' | 'GrayGlacier' | 'Paris' | 'Shanghai' | 'Cancun' | 'Prague' | 'Latest' | undefined;
|
|
350
|
+
/**
|
|
351
|
+
* The host the server will listen on.
|
|
352
|
+
*/
|
|
353
|
+
host?: string | undefined;
|
|
354
|
+
/**
|
|
355
|
+
* Initialize the genesis block with the given `genesis.json` file.
|
|
356
|
+
*/
|
|
357
|
+
init?: string | undefined;
|
|
358
|
+
/**
|
|
359
|
+
* Launch an ipc server at the given path or default path = `/tmp/anvil.ipc`.
|
|
360
|
+
*/
|
|
361
|
+
ipc?: string | undefined;
|
|
362
|
+
/**
|
|
363
|
+
* Initialize the chain from a previously saved state snapshot.
|
|
364
|
+
*/
|
|
365
|
+
loadState?: string | undefined;
|
|
366
|
+
/**
|
|
367
|
+
* BIP39 mnemonic phrase used for generating accounts.
|
|
368
|
+
*/
|
|
369
|
+
mnemonic?: string | undefined;
|
|
370
|
+
/**
|
|
371
|
+
* Automatically generates a BIP39 mnemonic phrase, and derives accounts from it.
|
|
372
|
+
*/
|
|
373
|
+
mnemonicRandom?: boolean | undefined;
|
|
374
|
+
/**
|
|
375
|
+
* Disable CORS.
|
|
376
|
+
*/
|
|
377
|
+
noCors?: boolean | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* Disable auto and interval mining, and mine on demand instead.
|
|
380
|
+
*/
|
|
381
|
+
noMining?: boolean | undefined;
|
|
382
|
+
/**
|
|
383
|
+
* Disables rate limiting for this node's provider.
|
|
384
|
+
*
|
|
385
|
+
* @defaultValue false
|
|
386
|
+
* @see https://github.com/alchemyplatform/alchemy-docs/blob/master/documentation/compute-units.md#rate-limits-cups
|
|
387
|
+
*/
|
|
388
|
+
noRateLimit?: boolean | undefined;
|
|
389
|
+
/**
|
|
390
|
+
* Explicitly disables the use of RPC caching.
|
|
391
|
+
*
|
|
392
|
+
* All storage slots are read entirely from the endpoint.
|
|
393
|
+
*/
|
|
394
|
+
noStorageCaching?: boolean | undefined;
|
|
395
|
+
/**
|
|
396
|
+
* How transactions are sorted in the mempool.
|
|
397
|
+
*
|
|
398
|
+
* @defaultValue fees
|
|
399
|
+
*/
|
|
400
|
+
order?: string | undefined;
|
|
401
|
+
/**
|
|
402
|
+
* Run an Optimism chain.
|
|
403
|
+
*/
|
|
404
|
+
optimism?: boolean | undefined;
|
|
405
|
+
/**
|
|
406
|
+
* Port number to listen on.
|
|
407
|
+
*
|
|
408
|
+
* @defaultValue 8545
|
|
409
|
+
*/
|
|
410
|
+
port?: number | undefined;
|
|
411
|
+
/**
|
|
412
|
+
* Don't keep full chain history. If a number argument is specified, at most this number of states is kept in memory.
|
|
413
|
+
*/
|
|
414
|
+
pruneHistory?: number | undefined | boolean;
|
|
415
|
+
/**
|
|
416
|
+
* Number of retry requests for spurious networks (timed out requests).
|
|
417
|
+
*
|
|
418
|
+
* @defaultValue 5
|
|
419
|
+
*/
|
|
420
|
+
retries?: number | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* Don't print anything on startup and don't print logs.
|
|
423
|
+
*/
|
|
424
|
+
silent?: boolean | undefined;
|
|
425
|
+
/**
|
|
426
|
+
* Slots in an epoch.
|
|
427
|
+
*/
|
|
428
|
+
slotsInAnEpoch?: number | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Enable steps tracing used for debug calls returning geth-style traces.
|
|
431
|
+
*/
|
|
432
|
+
stepsTracing?: boolean | undefined;
|
|
433
|
+
/**
|
|
434
|
+
* Interval in seconds at which the status is to be dumped to disk.
|
|
435
|
+
*/
|
|
436
|
+
stateInterval?: number | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* This is an alias for both `loadState` and `dumpState`. It initializes the chain with the state stored at the
|
|
439
|
+
* file, if it exists, and dumps the chain's state on exit
|
|
440
|
+
*/
|
|
441
|
+
state?: string | undefined;
|
|
442
|
+
/**
|
|
443
|
+
* Timeout in ms for requests sent to remote JSON-RPC server in forking mode.
|
|
444
|
+
*
|
|
445
|
+
* @defaultValue 45000
|
|
446
|
+
*/
|
|
447
|
+
timeout?: number | undefined;
|
|
448
|
+
/**
|
|
449
|
+
* The timestamp of the genesis block.
|
|
450
|
+
*/
|
|
451
|
+
timestamp?: number | bigint | undefined;
|
|
452
|
+
/**
|
|
453
|
+
* Number of blocks with transactions to keep in memory.
|
|
454
|
+
*/
|
|
455
|
+
transactionBlockKeeper?: number | undefined;
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
//# sourceMappingURL=anvil.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anvil.d.ts","sourceRoot":"","sources":["../../src/instances/anvil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAI1C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;;QAiDd;;;;WAIG;mBACQ,MAAM,GAAG,SAAS;QAC7B;;;;WAIG;sBACW,MAAM,GAAG,SAAS;QAChC;;WAEG;0BACe,OAAO,GAAG,SAAS;QACrC;;;;WAIG;kBACO,MAAM,GAAG,MAAM,GAAG,SAAS;QACrC;;WAEG;6BACkB,MAAM,GAAG,MAAM,GAAG,SAAS;QAChD;;WAEG;oBACS,MAAM,GAAG,SAAS;QAK9B;;WAEG;kBACO,MAAM,GAAG,SAAS;QAC5B;;;;WAIG;wBACa,MAAM,GAAG,SAAS;QAClC;;;;;WAKG;gCACqB,MAAM,GAAG,SAAS;QAC1C;;WAEG;oBACS,MAAM,GAAG,SAAS;QAC9B;;;;WAIG;yBACc,MAAM,GAAG,SAAS;QACnC;;WAEG;+BACoB,OAAO,GAAG,SAAS;QAC1C;;;WAGG;oBACS,MAAM,GAAG,SAAS;QAC9B;;;;;WAKG;kBACO,MAAM,GAAG,SAAS;QAC5B;;;;WAIG;0BACe,MAAM,GAAG,MAAM,GAAG,SAAS;QAC7C;;;;;WAKG;sBACW,MAAM,GAAG,SAAS;QAChC;;;;;;WAMG;qBACU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;QAC/C;;WAEG;2BACgB,MAAM,GAAG,SAAS;QACrC;;WAEG;mBACQ,MAAM,GAAG,MAAM,GAAG,SAAS;QACtC;;WAEG;mBACQ,MAAM,GAA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WAIG;QACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACzB;;WAEG;QACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAA;QAC3C;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC5B;;WAEG;QACH,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QAC5B;;WAEG;QACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACnC;;WAEG;QACH,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QAClC;;WAEG;QACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAClC;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B;;;;WAIG;QACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC5B;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;QACvC;;WAEG;QACH,sBAAsB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAC5C,CAAA;CACF"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Instance from '../Instance.js';
|
|
2
|
+
import { toArgs } from '../internal/utils.js';
|
|
2
3
|
import { execa } from '../processes/execa.js';
|
|
3
|
-
import { toArgs } from '../utils.js';
|
|
4
4
|
/**
|
|
5
5
|
* Defines an Anvil instance.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
9
|
-
* const instance = anvil({ forkRpcUrl: 'https://cloudflare-eth.com', port: 8546 })
|
|
9
|
+
* const instance = Instance.anvil({ forkRpcUrl: 'https://cloudflare-eth.com', port: 8546 })
|
|
10
10
|
* await instance.start()
|
|
11
11
|
* // ...
|
|
12
12
|
* await instance.stop()
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
|
-
export const anvil =
|
|
15
|
+
export const anvil = Instance.define((parameters) => {
|
|
16
16
|
const { binary = 'anvil', ...args } = parameters || {};
|
|
17
17
|
const name = 'anvil';
|
|
18
18
|
const process = execa({ name });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"anvil.js","sourceRoot":"","sources":["../../src/instances/anvil.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAE7C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,UAA6B,EAAE,EAAE;IACrE,MAAM,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,UAAU,IAAI,EAAE,CAAA;IAEtD,MAAM,IAAI,GAAG,OAAO,CAAA;IACpB,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,CAAA;IAE/B,OAAO;QACL,SAAS,EAAE;YACT,IAAI;YACJ,IAAI,OAAO;gBACT,OAAO,OAAO,CAAC,SAAS,CAAC,OAAO,CAAA;YAClC,CAAC;SACF;QACD,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,WAAW;QAC9B,IAAI;QACJ,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,IAAI;QACvB,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,OAAO;YACvC,OAAO,MAAM,OAAO,CAAC,KAAK,CACxB,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC;gBACA,GAAG,EAAE;oBACH,+BAA+B,EAAE,MAAM;iBACxC;aACF,CAAC,CAAA,GAAG,MAAM,IAAI,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,EAC5C;gBACE,GAAG,OAAO;gBACV,sEAAsE;gBACtE,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;oBACnC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;wBACjC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;wBAC/B,IAAI,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;4BAAE,OAAO,EAAE,CAAA;oBACjD,CAAC,CAAC,CAAA;oBACF,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;wBACjC,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAA;wBAC/B,IAAI,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;4BAAE,OAAM;wBACvC,MAAM,CAAC,OAAO,CAAC,CAAA;oBACjB,CAAC,CAAC,CAAA;gBACJ,CAAC;aACF,CACF,CAAA;QACH,CAAC;QACD,KAAK,CAAC,IAAI;YACR,MAAM,OAAO,CAAC,IAAI,EAAE,CAAA;QACtB,CAAC;KACF,CAAA;AACH,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import * as Instance from '../Instance.js';
|
|
2
|
+
export declare function command(parameters: tempo.Parameters): string[];
|
|
3
|
+
/**
|
|
4
|
+
* Defines a Tempo instance.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* const instance = Instance.tempo({ port: 8545 })
|
|
9
|
+
* await instance.start()
|
|
10
|
+
* // ...
|
|
11
|
+
* await instance.stop()
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const tempo: Instance.define.ReturnType<{
|
|
15
|
+
args: {
|
|
16
|
+
[x: string]: unknown;
|
|
17
|
+
/**
|
|
18
|
+
* Interval between blocks.
|
|
19
|
+
*/
|
|
20
|
+
blockTime?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* How many transactions to mine per block
|
|
23
|
+
*/
|
|
24
|
+
blockMaxTransactions?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Path to a configuration file.
|
|
27
|
+
*/
|
|
28
|
+
config?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The chain this node is running.
|
|
31
|
+
* Possible values are either a built-in chain or the path to a chain specification file.
|
|
32
|
+
*
|
|
33
|
+
* Built-in chains:
|
|
34
|
+
* - testnet
|
|
35
|
+
*
|
|
36
|
+
* @default "testnet"
|
|
37
|
+
*/
|
|
38
|
+
chain?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The path to the data dir for all reth files and subdirectories.
|
|
41
|
+
*/
|
|
42
|
+
datadir?: string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Faucet options.
|
|
45
|
+
*/
|
|
46
|
+
faucet?: {
|
|
47
|
+
/**
|
|
48
|
+
* Target token addresses for the faucet to be funding with
|
|
49
|
+
*/
|
|
50
|
+
addresses?: string[] | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Amount for each faucet funding transaction
|
|
53
|
+
*/
|
|
54
|
+
amount?: bigint | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Faucet funding mnemonic
|
|
57
|
+
*/
|
|
58
|
+
privateKey?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Host the server will listen on.
|
|
62
|
+
*/
|
|
63
|
+
host?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Derive dev accounts from a fixed mnemonic instead of random ones.
|
|
66
|
+
* @default "test test test test test test test test test test test junk"
|
|
67
|
+
*/
|
|
68
|
+
mnemonic?: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Port the server will listen on.
|
|
71
|
+
*/
|
|
72
|
+
port?: number | undefined;
|
|
73
|
+
};
|
|
74
|
+
readonly process: import("../processes/execa.js").Process_internal;
|
|
75
|
+
}, Instance.tempo.Parameters | undefined>;
|
|
76
|
+
export declare namespace tempo {
|
|
77
|
+
type Parameters = {
|
|
78
|
+
/**
|
|
79
|
+
* Path or alias to the Tempo binary.
|
|
80
|
+
*/
|
|
81
|
+
binary?: string | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Interval between blocks.
|
|
84
|
+
*/
|
|
85
|
+
blockTime?: string | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* How many transactions to mine per block
|
|
88
|
+
*/
|
|
89
|
+
blockMaxTransactions?: number | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Path to a configuration file.
|
|
92
|
+
*/
|
|
93
|
+
config?: string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* The chain this node is running.
|
|
96
|
+
* Possible values are either a built-in chain or the path to a chain specification file.
|
|
97
|
+
*
|
|
98
|
+
* Built-in chains:
|
|
99
|
+
* - testnet
|
|
100
|
+
*
|
|
101
|
+
* @default "testnet"
|
|
102
|
+
*/
|
|
103
|
+
chain?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* The path to the data dir for all reth files and subdirectories.
|
|
106
|
+
*/
|
|
107
|
+
datadir?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Faucet options.
|
|
110
|
+
*/
|
|
111
|
+
faucet?: {
|
|
112
|
+
/**
|
|
113
|
+
* Target token addresses for the faucet to be funding with
|
|
114
|
+
*/
|
|
115
|
+
addresses?: string[] | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Amount for each faucet funding transaction
|
|
118
|
+
*/
|
|
119
|
+
amount?: bigint | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* Faucet funding mnemonic
|
|
122
|
+
*/
|
|
123
|
+
privateKey?: string | undefined;
|
|
124
|
+
} | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Rust log level configuration (sets RUST_LOG environment variable).
|
|
127
|
+
* Can be a log level or a custom filter string.
|
|
128
|
+
*/
|
|
129
|
+
log?: 'trace' | 'debug' | 'info' | 'warn' | 'error' | (string & {}) | boolean | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Host the server will listen on.
|
|
132
|
+
*/
|
|
133
|
+
host?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Derive dev accounts from a fixed mnemonic instead of random ones.
|
|
136
|
+
* @default "test test test test test test test test test test test junk"
|
|
137
|
+
*/
|
|
138
|
+
mnemonic?: string | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* Port the server will listen on.
|
|
141
|
+
*/
|
|
142
|
+
port?: number | undefined;
|
|
143
|
+
} & Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Defines a Tempo instance.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```ts
|
|
150
|
+
* const instance = Instance.tempoDocker({ port: 8545 })
|
|
151
|
+
* await instance.start()
|
|
152
|
+
* // ...
|
|
153
|
+
* await instance.stop()
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
export declare const tempoDocker: Instance.define.ReturnType<{
|
|
157
|
+
args: {
|
|
158
|
+
[x: string]: unknown;
|
|
159
|
+
/**
|
|
160
|
+
* Host the server will listen on.
|
|
161
|
+
*/
|
|
162
|
+
host?: string | undefined;
|
|
163
|
+
/**
|
|
164
|
+
* Port the server will listen on.
|
|
165
|
+
*/
|
|
166
|
+
port?: number | undefined;
|
|
167
|
+
};
|
|
168
|
+
}, Instance.tempoDocker.Parameters | undefined>;
|
|
169
|
+
export declare namespace tempoDocker {
|
|
170
|
+
type Parameters = Omit<tempo.Parameters, 'binary'> & {
|
|
171
|
+
/**
|
|
172
|
+
* Name of the container.
|
|
173
|
+
*/
|
|
174
|
+
containerName?: string | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Docker image to use.
|
|
177
|
+
*/
|
|
178
|
+
image?: string | undefined;
|
|
179
|
+
/**
|
|
180
|
+
* Host the server will listen on.
|
|
181
|
+
*/
|
|
182
|
+
host?: string | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Port the server will listen on.
|
|
185
|
+
*/
|
|
186
|
+
port?: number | undefined;
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=tempo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tempo.d.ts","sourceRoot":"","sources":["../../src/instances/tempo.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAA;AAI1C,wBAAgB,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,GAAG,MAAM,EAAE,CAoD9D;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;;;QA+Dd;;WAEG;oBACS,MAAM,GAAG,SAAS;QAC9B;;WAEG;+BACoB,MAAM,GAAG,SAAS;QACzC;;WAEG;iBACM,MAAM,GAAG,SAAS;QAC3B;;;;;;;;WAQG;gBACK,MAAM,GAAG,SAAS;QAC1B;;WAEG;kBACO,MAAM,GAAG,SAAS;QAC5B;;WAEG;iBAEC;YACE;;eAEG;YACH,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;YAChC;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;YAC3B;;eAEG;YACH,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;SAChC,GACD,SAAS;QAcb;;WAEG;eACI,MAAM,GAAG,SAAS;QACzB;;;WAGG;mBACQ,MAAM,GAAG,SAAS;QAC7B;;WAEG;eACI,MAAM,GAAG,SAAS;;;yCA9E3B,CAAA;AAEF,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,KAAY,UAAU,GAAG;QACvB;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC3B;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC9B;;WAEG;QACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QACzC;;WAEG;QACH,MAAM,CAA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