@gitmyabi/curvegauge 1.0.0
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/README.md +108 -0
- package/contracts/CurveGauge_json.d.ts +1590 -0
- package/contracts/CurveGauge_json.js +1824 -0
- package/contracts/CurveGauge_json.ts +2184 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* CurveGauge_json ABI
|
|
4
|
+
*
|
|
5
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CurveGauge_jsonAbi: readonly [{
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly stateMutability: "nonpayable";
|
|
10
|
+
readonly type: "constructor";
|
|
11
|
+
}, {
|
|
12
|
+
readonly inputs: readonly [{
|
|
13
|
+
readonly internalType: "bytes32";
|
|
14
|
+
readonly name: "stateId";
|
|
15
|
+
readonly type: "bytes32";
|
|
16
|
+
}];
|
|
17
|
+
readonly name: "AlreadyInState";
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
}, {
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
readonly name: "ArrayLengthMismatch";
|
|
22
|
+
readonly type: "error";
|
|
23
|
+
}, {
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly internalType: "bytes32";
|
|
26
|
+
readonly name: "toStateId";
|
|
27
|
+
readonly type: "bytes32";
|
|
28
|
+
}, {
|
|
29
|
+
readonly internalType: "bytes32";
|
|
30
|
+
readonly name: "currentStateId";
|
|
31
|
+
readonly type: "bytes32";
|
|
32
|
+
}];
|
|
33
|
+
readonly name: "CannotEnterStateWithLowerHeight";
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
}, {
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "CannotExitFromNoAllocationState";
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
}, {
|
|
40
|
+
readonly inputs: readonly [{
|
|
41
|
+
readonly internalType: "bytes32";
|
|
42
|
+
readonly name: "toStateId";
|
|
43
|
+
readonly type: "bytes32";
|
|
44
|
+
}, {
|
|
45
|
+
readonly internalType: "bytes32";
|
|
46
|
+
readonly name: "currentStateId";
|
|
47
|
+
readonly type: "bytes32";
|
|
48
|
+
}];
|
|
49
|
+
readonly name: "CannotExitToStateWithHigherHeight";
|
|
50
|
+
readonly type: "error";
|
|
51
|
+
}, {
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "EmergencyExitUnavailable";
|
|
54
|
+
readonly type: "error";
|
|
55
|
+
}, {
|
|
56
|
+
readonly inputs: readonly [];
|
|
57
|
+
readonly name: "EmergencyModeActivated";
|
|
58
|
+
readonly type: "error";
|
|
59
|
+
}, {
|
|
60
|
+
readonly inputs: readonly [];
|
|
61
|
+
readonly name: "EnterUnavailable";
|
|
62
|
+
readonly type: "error";
|
|
63
|
+
}, {
|
|
64
|
+
readonly inputs: readonly [];
|
|
65
|
+
readonly name: "InconsistentState";
|
|
66
|
+
readonly type: "error";
|
|
67
|
+
}, {
|
|
68
|
+
readonly inputs: readonly [];
|
|
69
|
+
readonly name: "IncorrectAmount";
|
|
70
|
+
readonly type: "error";
|
|
71
|
+
}, {
|
|
72
|
+
readonly inputs: readonly [{
|
|
73
|
+
readonly internalType: "uint256";
|
|
74
|
+
readonly name: "navDelta";
|
|
75
|
+
readonly type: "uint256";
|
|
76
|
+
}, {
|
|
77
|
+
readonly internalType: "uint256";
|
|
78
|
+
readonly name: "maxSlippageCached";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}];
|
|
81
|
+
readonly name: "IncorrectSlippage";
|
|
82
|
+
readonly type: "error";
|
|
83
|
+
}, {
|
|
84
|
+
readonly inputs: readonly [{
|
|
85
|
+
readonly internalType: "bytes32";
|
|
86
|
+
readonly name: "stateId";
|
|
87
|
+
readonly type: "bytes32";
|
|
88
|
+
}];
|
|
89
|
+
readonly name: "IncorrectStateId";
|
|
90
|
+
readonly type: "error";
|
|
91
|
+
}, {
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
readonly name: "InvalidInitialization";
|
|
94
|
+
readonly type: "error";
|
|
95
|
+
}, {
|
|
96
|
+
readonly inputs: readonly [];
|
|
97
|
+
readonly name: "NavResolutionModeActivated";
|
|
98
|
+
readonly type: "error";
|
|
99
|
+
}, {
|
|
100
|
+
readonly inputs: readonly [];
|
|
101
|
+
readonly name: "NavResolutionModeNotActivated";
|
|
102
|
+
readonly type: "error";
|
|
103
|
+
}, {
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly internalType: "bytes32";
|
|
106
|
+
readonly name: "currentStateId";
|
|
107
|
+
readonly type: "bytes32";
|
|
108
|
+
}, {
|
|
109
|
+
readonly internalType: "uint256";
|
|
110
|
+
readonly name: "currentStateBitmask";
|
|
111
|
+
readonly type: "uint256";
|
|
112
|
+
}];
|
|
113
|
+
readonly name: "NotInTargetState";
|
|
114
|
+
readonly type: "error";
|
|
115
|
+
}, {
|
|
116
|
+
readonly inputs: readonly [];
|
|
117
|
+
readonly name: "NotInitializing";
|
|
118
|
+
readonly type: "error";
|
|
119
|
+
}, {
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly internalType: "address";
|
|
122
|
+
readonly name: "token";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
}];
|
|
125
|
+
readonly name: "NotWhitelistedToken";
|
|
126
|
+
readonly type: "error";
|
|
127
|
+
}, {
|
|
128
|
+
readonly inputs: readonly [];
|
|
129
|
+
readonly name: "ReentrancyGuardReentrantCall";
|
|
130
|
+
readonly type: "error";
|
|
131
|
+
}, {
|
|
132
|
+
readonly inputs: readonly [];
|
|
133
|
+
readonly name: "ReshufflingModeDisabled";
|
|
134
|
+
readonly type: "error";
|
|
135
|
+
}, {
|
|
136
|
+
readonly inputs: readonly [{
|
|
137
|
+
readonly internalType: "address";
|
|
138
|
+
readonly name: "token";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}];
|
|
141
|
+
readonly name: "SafeERC20FailedOperation";
|
|
142
|
+
readonly type: "error";
|
|
143
|
+
}, {
|
|
144
|
+
readonly inputs: readonly [{
|
|
145
|
+
readonly internalType: "uint256";
|
|
146
|
+
readonly name: "navBefore";
|
|
147
|
+
readonly type: "uint256";
|
|
148
|
+
}, {
|
|
149
|
+
readonly internalType: "uint256";
|
|
150
|
+
readonly name: "navAfter";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
}, {
|
|
153
|
+
readonly internalType: "uint256";
|
|
154
|
+
readonly name: "minNavDelta";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
}];
|
|
157
|
+
readonly name: "SlippageCheckFailed";
|
|
158
|
+
readonly type: "error";
|
|
159
|
+
}, {
|
|
160
|
+
readonly inputs: readonly [{
|
|
161
|
+
readonly internalType: "bytes32";
|
|
162
|
+
readonly name: "stateId";
|
|
163
|
+
readonly type: "bytes32";
|
|
164
|
+
}];
|
|
165
|
+
readonly name: "StateAlreadyExists";
|
|
166
|
+
readonly type: "error";
|
|
167
|
+
}, {
|
|
168
|
+
readonly inputs: readonly [{
|
|
169
|
+
readonly internalType: "bytes32";
|
|
170
|
+
readonly name: "stateId";
|
|
171
|
+
readonly type: "bytes32";
|
|
172
|
+
}];
|
|
173
|
+
readonly name: "StateHasZeroBitmask";
|
|
174
|
+
readonly type: "error";
|
|
175
|
+
}, {
|
|
176
|
+
readonly inputs: readonly [{
|
|
177
|
+
readonly internalType: "bytes32";
|
|
178
|
+
readonly name: "stateId";
|
|
179
|
+
readonly type: "bytes32";
|
|
180
|
+
}];
|
|
181
|
+
readonly name: "StateNotFound";
|
|
182
|
+
readonly type: "error";
|
|
183
|
+
}, {
|
|
184
|
+
readonly inputs: readonly [];
|
|
185
|
+
readonly name: "TargetStateAlreadySet";
|
|
186
|
+
readonly type: "error";
|
|
187
|
+
}, {
|
|
188
|
+
readonly inputs: readonly [{
|
|
189
|
+
readonly internalType: "address";
|
|
190
|
+
readonly name: "value";
|
|
191
|
+
readonly type: "address";
|
|
192
|
+
}];
|
|
193
|
+
readonly name: "TokenAlreadySet";
|
|
194
|
+
readonly type: "error";
|
|
195
|
+
}, {
|
|
196
|
+
readonly inputs: readonly [{
|
|
197
|
+
readonly internalType: "address";
|
|
198
|
+
readonly name: "token";
|
|
199
|
+
readonly type: "address";
|
|
200
|
+
}];
|
|
201
|
+
readonly name: "TokenNotFound";
|
|
202
|
+
readonly type: "error";
|
|
203
|
+
}, {
|
|
204
|
+
readonly inputs: readonly [];
|
|
205
|
+
readonly name: "TreasuryNotSet";
|
|
206
|
+
readonly type: "error";
|
|
207
|
+
}, {
|
|
208
|
+
readonly inputs: readonly [];
|
|
209
|
+
readonly name: "Unauthorized";
|
|
210
|
+
readonly type: "error";
|
|
211
|
+
}, {
|
|
212
|
+
readonly inputs: readonly [];
|
|
213
|
+
readonly name: "ZeroAddress";
|
|
214
|
+
readonly type: "error";
|
|
215
|
+
}, {
|
|
216
|
+
readonly inputs: readonly [];
|
|
217
|
+
readonly name: "ZeroArrayLength";
|
|
218
|
+
readonly type: "error";
|
|
219
|
+
}, {
|
|
220
|
+
readonly inputs: readonly [];
|
|
221
|
+
readonly name: "ZeroState";
|
|
222
|
+
readonly type: "error";
|
|
223
|
+
}, {
|
|
224
|
+
readonly anonymous: false;
|
|
225
|
+
readonly inputs: readonly [{
|
|
226
|
+
readonly indexed: false;
|
|
227
|
+
readonly internalType: "bytes32";
|
|
228
|
+
readonly name: "toStateId";
|
|
229
|
+
readonly type: "bytes32";
|
|
230
|
+
}];
|
|
231
|
+
readonly name: "EmergencyExitFailed";
|
|
232
|
+
readonly type: "event";
|
|
233
|
+
}, {
|
|
234
|
+
readonly anonymous: false;
|
|
235
|
+
readonly inputs: readonly [{
|
|
236
|
+
readonly indexed: false;
|
|
237
|
+
readonly internalType: "uint256";
|
|
238
|
+
readonly name: "oldEmergencyExitMaxSlippage";
|
|
239
|
+
readonly type: "uint256";
|
|
240
|
+
}, {
|
|
241
|
+
readonly indexed: false;
|
|
242
|
+
readonly internalType: "uint256";
|
|
243
|
+
readonly name: "newEmergencyExitMaxSlippage";
|
|
244
|
+
readonly type: "uint256";
|
|
245
|
+
}];
|
|
246
|
+
readonly name: "EmergencyExitMaxSlippageUpdated";
|
|
247
|
+
readonly type: "event";
|
|
248
|
+
}, {
|
|
249
|
+
readonly anonymous: false;
|
|
250
|
+
readonly inputs: readonly [{
|
|
251
|
+
readonly indexed: false;
|
|
252
|
+
readonly internalType: "bytes32";
|
|
253
|
+
readonly name: "toStateId";
|
|
254
|
+
readonly type: "bytes32";
|
|
255
|
+
}];
|
|
256
|
+
readonly name: "EmergencyExitSucceeded";
|
|
257
|
+
readonly type: "event";
|
|
258
|
+
}, {
|
|
259
|
+
readonly anonymous: false;
|
|
260
|
+
readonly inputs: readonly [{
|
|
261
|
+
readonly indexed: false;
|
|
262
|
+
readonly internalType: "bytes32";
|
|
263
|
+
readonly name: "toStateId";
|
|
264
|
+
readonly type: "bytes32";
|
|
265
|
+
}];
|
|
266
|
+
readonly name: "EmergencyExited";
|
|
267
|
+
readonly type: "event";
|
|
268
|
+
}, {
|
|
269
|
+
readonly anonymous: false;
|
|
270
|
+
readonly inputs: readonly [{
|
|
271
|
+
readonly indexed: false;
|
|
272
|
+
readonly internalType: "bool";
|
|
273
|
+
readonly name: "isEmergencyMode";
|
|
274
|
+
readonly type: "bool";
|
|
275
|
+
}];
|
|
276
|
+
readonly name: "EmergencyModeUpdated";
|
|
277
|
+
readonly type: "event";
|
|
278
|
+
}, {
|
|
279
|
+
readonly anonymous: false;
|
|
280
|
+
readonly inputs: readonly [{
|
|
281
|
+
readonly indexed: false;
|
|
282
|
+
readonly internalType: "uint256";
|
|
283
|
+
readonly name: "oldEnterMaxSlippage";
|
|
284
|
+
readonly type: "uint256";
|
|
285
|
+
}, {
|
|
286
|
+
readonly indexed: false;
|
|
287
|
+
readonly internalType: "uint256";
|
|
288
|
+
readonly name: "newEnterMaxSlippage";
|
|
289
|
+
readonly type: "uint256";
|
|
290
|
+
}];
|
|
291
|
+
readonly name: "EnterMaxSlippageUpdated";
|
|
292
|
+
readonly type: "event";
|
|
293
|
+
}, {
|
|
294
|
+
readonly anonymous: false;
|
|
295
|
+
readonly inputs: readonly [{
|
|
296
|
+
readonly indexed: false;
|
|
297
|
+
readonly internalType: "uint256";
|
|
298
|
+
readonly name: "navBefore";
|
|
299
|
+
readonly type: "uint256";
|
|
300
|
+
}, {
|
|
301
|
+
readonly indexed: false;
|
|
302
|
+
readonly internalType: "uint256";
|
|
303
|
+
readonly name: "navAfter";
|
|
304
|
+
readonly type: "uint256";
|
|
305
|
+
}, {
|
|
306
|
+
readonly indexed: false;
|
|
307
|
+
readonly internalType: "bool";
|
|
308
|
+
readonly name: "hasRemainder";
|
|
309
|
+
readonly type: "bool";
|
|
310
|
+
}];
|
|
311
|
+
readonly name: "Entered";
|
|
312
|
+
readonly type: "event";
|
|
313
|
+
}, {
|
|
314
|
+
readonly anonymous: false;
|
|
315
|
+
readonly inputs: readonly [{
|
|
316
|
+
readonly indexed: false;
|
|
317
|
+
readonly internalType: "uint256";
|
|
318
|
+
readonly name: "oldExitMaxSlippage";
|
|
319
|
+
readonly type: "uint256";
|
|
320
|
+
}, {
|
|
321
|
+
readonly indexed: false;
|
|
322
|
+
readonly internalType: "uint256";
|
|
323
|
+
readonly name: "newExitMaxSlippage";
|
|
324
|
+
readonly type: "uint256";
|
|
325
|
+
}];
|
|
326
|
+
readonly name: "ExitMaxSlippageUpdated";
|
|
327
|
+
readonly type: "event";
|
|
328
|
+
}, {
|
|
329
|
+
readonly anonymous: false;
|
|
330
|
+
readonly inputs: readonly [{
|
|
331
|
+
readonly indexed: false;
|
|
332
|
+
readonly internalType: "uint256";
|
|
333
|
+
readonly name: "navBefore";
|
|
334
|
+
readonly type: "uint256";
|
|
335
|
+
}, {
|
|
336
|
+
readonly indexed: false;
|
|
337
|
+
readonly internalType: "uint256";
|
|
338
|
+
readonly name: "navAfter";
|
|
339
|
+
readonly type: "uint256";
|
|
340
|
+
}, {
|
|
341
|
+
readonly indexed: false;
|
|
342
|
+
readonly internalType: "bytes32";
|
|
343
|
+
readonly name: "stateId";
|
|
344
|
+
readonly type: "bytes32";
|
|
345
|
+
}];
|
|
346
|
+
readonly name: "Exited";
|
|
347
|
+
readonly type: "event";
|
|
348
|
+
}, {
|
|
349
|
+
readonly anonymous: false;
|
|
350
|
+
readonly inputs: readonly [{
|
|
351
|
+
readonly indexed: false;
|
|
352
|
+
readonly internalType: "bytes32";
|
|
353
|
+
readonly name: "stateId";
|
|
354
|
+
readonly type: "bytes32";
|
|
355
|
+
}, {
|
|
356
|
+
readonly indexed: false;
|
|
357
|
+
readonly internalType: "uint256";
|
|
358
|
+
readonly name: "navAfter";
|
|
359
|
+
readonly type: "uint256";
|
|
360
|
+
}];
|
|
361
|
+
readonly name: "Harvested";
|
|
362
|
+
readonly type: "event";
|
|
363
|
+
}, {
|
|
364
|
+
readonly anonymous: false;
|
|
365
|
+
readonly inputs: readonly [{
|
|
366
|
+
readonly indexed: false;
|
|
367
|
+
readonly internalType: "uint64";
|
|
368
|
+
readonly name: "version";
|
|
369
|
+
readonly type: "uint64";
|
|
370
|
+
}];
|
|
371
|
+
readonly name: "Initialized";
|
|
372
|
+
readonly type: "event";
|
|
373
|
+
}, {
|
|
374
|
+
readonly anonymous: false;
|
|
375
|
+
readonly inputs: readonly [{
|
|
376
|
+
readonly indexed: false;
|
|
377
|
+
readonly internalType: "address";
|
|
378
|
+
readonly name: "";
|
|
379
|
+
readonly type: "address";
|
|
380
|
+
}];
|
|
381
|
+
readonly name: "InputTokenSet";
|
|
382
|
+
readonly type: "event";
|
|
383
|
+
}, {
|
|
384
|
+
readonly anonymous: false;
|
|
385
|
+
readonly inputs: readonly [{
|
|
386
|
+
readonly indexed: false;
|
|
387
|
+
readonly internalType: "bool";
|
|
388
|
+
readonly name: "isNavResolutionMode";
|
|
389
|
+
readonly type: "bool";
|
|
390
|
+
}];
|
|
391
|
+
readonly name: "NavResolutionModeUpdated";
|
|
392
|
+
readonly type: "event";
|
|
393
|
+
}, {
|
|
394
|
+
readonly anonymous: false;
|
|
395
|
+
readonly inputs: readonly [{
|
|
396
|
+
readonly indexed: false;
|
|
397
|
+
readonly internalType: "address";
|
|
398
|
+
readonly name: "";
|
|
399
|
+
readonly type: "address";
|
|
400
|
+
}];
|
|
401
|
+
readonly name: "OutputTokenSet";
|
|
402
|
+
readonly type: "event";
|
|
403
|
+
}, {
|
|
404
|
+
readonly anonymous: false;
|
|
405
|
+
readonly inputs: readonly [{
|
|
406
|
+
readonly indexed: false;
|
|
407
|
+
readonly internalType: "bytes32";
|
|
408
|
+
readonly name: "stateId";
|
|
409
|
+
readonly type: "bytes32";
|
|
410
|
+
}];
|
|
411
|
+
readonly name: "ReenteredToState";
|
|
412
|
+
readonly type: "event";
|
|
413
|
+
}, {
|
|
414
|
+
readonly anonymous: false;
|
|
415
|
+
readonly inputs: readonly [{
|
|
416
|
+
readonly indexed: false;
|
|
417
|
+
readonly internalType: "bytes32";
|
|
418
|
+
readonly name: "oldStateId";
|
|
419
|
+
readonly type: "bytes32";
|
|
420
|
+
}, {
|
|
421
|
+
readonly indexed: false;
|
|
422
|
+
readonly internalType: "bytes32";
|
|
423
|
+
readonly name: "newStateId";
|
|
424
|
+
readonly type: "bytes32";
|
|
425
|
+
}, {
|
|
426
|
+
readonly indexed: false;
|
|
427
|
+
readonly internalType: "uint256";
|
|
428
|
+
readonly name: "newStateBitmask";
|
|
429
|
+
readonly type: "uint256";
|
|
430
|
+
}];
|
|
431
|
+
readonly name: "StateUpdated";
|
|
432
|
+
readonly type: "event";
|
|
433
|
+
}, {
|
|
434
|
+
readonly inputs: readonly [{
|
|
435
|
+
readonly internalType: "bytes32";
|
|
436
|
+
readonly name: "acceptedStateId";
|
|
437
|
+
readonly type: "bytes32";
|
|
438
|
+
}];
|
|
439
|
+
readonly name: "acceptNav";
|
|
440
|
+
readonly outputs: readonly [{
|
|
441
|
+
readonly internalType: "uint256";
|
|
442
|
+
readonly name: "";
|
|
443
|
+
readonly type: "uint256";
|
|
444
|
+
}];
|
|
445
|
+
readonly stateMutability: "nonpayable";
|
|
446
|
+
readonly type: "function";
|
|
447
|
+
}, {
|
|
448
|
+
readonly inputs: readonly [];
|
|
449
|
+
readonly name: "currentStateId";
|
|
450
|
+
readonly outputs: readonly [{
|
|
451
|
+
readonly internalType: "bytes32";
|
|
452
|
+
readonly name: "";
|
|
453
|
+
readonly type: "bytes32";
|
|
454
|
+
}];
|
|
455
|
+
readonly stateMutability: "view";
|
|
456
|
+
readonly type: "function";
|
|
457
|
+
}, {
|
|
458
|
+
readonly inputs: readonly [];
|
|
459
|
+
readonly name: "currentStateNav";
|
|
460
|
+
readonly outputs: readonly [{
|
|
461
|
+
readonly internalType: "uint256";
|
|
462
|
+
readonly name: "";
|
|
463
|
+
readonly type: "uint256";
|
|
464
|
+
}];
|
|
465
|
+
readonly stateMutability: "view";
|
|
466
|
+
readonly type: "function";
|
|
467
|
+
}, {
|
|
468
|
+
readonly inputs: readonly [{
|
|
469
|
+
readonly internalType: "bytes32";
|
|
470
|
+
readonly name: "toStateId";
|
|
471
|
+
readonly type: "bytes32";
|
|
472
|
+
}, {
|
|
473
|
+
readonly internalType: "uint256";
|
|
474
|
+
readonly name: "share";
|
|
475
|
+
readonly type: "uint256";
|
|
476
|
+
}, {
|
|
477
|
+
readonly internalType: "uint256";
|
|
478
|
+
readonly name: "minNavDelta";
|
|
479
|
+
readonly type: "uint256";
|
|
480
|
+
}];
|
|
481
|
+
readonly name: "emergencyExit";
|
|
482
|
+
readonly outputs: readonly [];
|
|
483
|
+
readonly stateMutability: "payable";
|
|
484
|
+
readonly type: "function";
|
|
485
|
+
}, {
|
|
486
|
+
readonly inputs: readonly [];
|
|
487
|
+
readonly name: "emergencyExitMaxSlippage";
|
|
488
|
+
readonly outputs: readonly [{
|
|
489
|
+
readonly internalType: "uint256";
|
|
490
|
+
readonly name: "";
|
|
491
|
+
readonly type: "uint256";
|
|
492
|
+
}];
|
|
493
|
+
readonly stateMutability: "view";
|
|
494
|
+
readonly type: "function";
|
|
495
|
+
}, {
|
|
496
|
+
readonly inputs: readonly [{
|
|
497
|
+
readonly internalType: "uint256[]";
|
|
498
|
+
readonly name: "amounts";
|
|
499
|
+
readonly type: "uint256[]";
|
|
500
|
+
}, {
|
|
501
|
+
readonly internalType: "uint256";
|
|
502
|
+
readonly name: "minNavDelta";
|
|
503
|
+
readonly type: "uint256";
|
|
504
|
+
}];
|
|
505
|
+
readonly name: "enter";
|
|
506
|
+
readonly outputs: readonly [{
|
|
507
|
+
readonly internalType: "uint256";
|
|
508
|
+
readonly name: "";
|
|
509
|
+
readonly type: "uint256";
|
|
510
|
+
}, {
|
|
511
|
+
readonly internalType: "bool";
|
|
512
|
+
readonly name: "";
|
|
513
|
+
readonly type: "bool";
|
|
514
|
+
}, {
|
|
515
|
+
readonly internalType: "uint256[]";
|
|
516
|
+
readonly name: "";
|
|
517
|
+
readonly type: "uint256[]";
|
|
518
|
+
}];
|
|
519
|
+
readonly stateMutability: "payable";
|
|
520
|
+
readonly type: "function";
|
|
521
|
+
}, {
|
|
522
|
+
readonly inputs: readonly [];
|
|
523
|
+
readonly name: "enterMaxSlippage";
|
|
524
|
+
readonly outputs: readonly [{
|
|
525
|
+
readonly internalType: "uint256";
|
|
526
|
+
readonly name: "";
|
|
527
|
+
readonly type: "uint256";
|
|
528
|
+
}];
|
|
529
|
+
readonly stateMutability: "view";
|
|
530
|
+
readonly type: "function";
|
|
531
|
+
}, {
|
|
532
|
+
readonly inputs: readonly [{
|
|
533
|
+
readonly internalType: "uint256";
|
|
534
|
+
readonly name: "share";
|
|
535
|
+
readonly type: "uint256";
|
|
536
|
+
}, {
|
|
537
|
+
readonly internalType: "uint256";
|
|
538
|
+
readonly name: "maxNavDelta";
|
|
539
|
+
readonly type: "uint256";
|
|
540
|
+
}];
|
|
541
|
+
readonly name: "exit";
|
|
542
|
+
readonly outputs: readonly [{
|
|
543
|
+
readonly internalType: "address[]";
|
|
544
|
+
readonly name: "";
|
|
545
|
+
readonly type: "address[]";
|
|
546
|
+
}, {
|
|
547
|
+
readonly internalType: "uint256[]";
|
|
548
|
+
readonly name: "";
|
|
549
|
+
readonly type: "uint256[]";
|
|
550
|
+
}];
|
|
551
|
+
readonly stateMutability: "payable";
|
|
552
|
+
readonly type: "function";
|
|
553
|
+
}, {
|
|
554
|
+
readonly inputs: readonly [];
|
|
555
|
+
readonly name: "exitMaxSlippage";
|
|
556
|
+
readonly outputs: readonly [{
|
|
557
|
+
readonly internalType: "uint256";
|
|
558
|
+
readonly name: "";
|
|
559
|
+
readonly type: "uint256";
|
|
560
|
+
}];
|
|
561
|
+
readonly stateMutability: "view";
|
|
562
|
+
readonly type: "function";
|
|
563
|
+
}, {
|
|
564
|
+
readonly inputs: readonly [];
|
|
565
|
+
readonly name: "gauge";
|
|
566
|
+
readonly outputs: readonly [{
|
|
567
|
+
readonly internalType: "address";
|
|
568
|
+
readonly name: "";
|
|
569
|
+
readonly type: "address";
|
|
570
|
+
}];
|
|
571
|
+
readonly stateMutability: "view";
|
|
572
|
+
readonly type: "function";
|
|
573
|
+
}, {
|
|
574
|
+
readonly inputs: readonly [];
|
|
575
|
+
readonly name: "getInputTokens";
|
|
576
|
+
readonly outputs: readonly [{
|
|
577
|
+
readonly internalType: "address[]";
|
|
578
|
+
readonly name: "";
|
|
579
|
+
readonly type: "address[]";
|
|
580
|
+
}];
|
|
581
|
+
readonly stateMutability: "view";
|
|
582
|
+
readonly type: "function";
|
|
583
|
+
}, {
|
|
584
|
+
readonly inputs: readonly [];
|
|
585
|
+
readonly name: "getOutputTokens";
|
|
586
|
+
readonly outputs: readonly [{
|
|
587
|
+
readonly internalType: "address[]";
|
|
588
|
+
readonly name: "";
|
|
589
|
+
readonly type: "address[]";
|
|
590
|
+
}];
|
|
591
|
+
readonly stateMutability: "view";
|
|
592
|
+
readonly type: "function";
|
|
593
|
+
}, {
|
|
594
|
+
readonly inputs: readonly [];
|
|
595
|
+
readonly name: "getStateIds";
|
|
596
|
+
readonly outputs: readonly [{
|
|
597
|
+
readonly internalType: "bytes32[]";
|
|
598
|
+
readonly name: "";
|
|
599
|
+
readonly type: "bytes32[]";
|
|
600
|
+
}];
|
|
601
|
+
readonly stateMutability: "view";
|
|
602
|
+
readonly type: "function";
|
|
603
|
+
}, {
|
|
604
|
+
readonly inputs: readonly [{
|
|
605
|
+
readonly internalType: "address";
|
|
606
|
+
readonly name: "token";
|
|
607
|
+
readonly type: "address";
|
|
608
|
+
}, {
|
|
609
|
+
readonly internalType: "uint256";
|
|
610
|
+
readonly name: "amount";
|
|
611
|
+
readonly type: "uint256";
|
|
612
|
+
}];
|
|
613
|
+
readonly name: "getTokenAmountInNotion";
|
|
614
|
+
readonly outputs: readonly [{
|
|
615
|
+
readonly internalType: "uint256";
|
|
616
|
+
readonly name: "";
|
|
617
|
+
readonly type: "uint256";
|
|
618
|
+
}];
|
|
619
|
+
readonly stateMutability: "view";
|
|
620
|
+
readonly type: "function";
|
|
621
|
+
}, {
|
|
622
|
+
readonly inputs: readonly [];
|
|
623
|
+
readonly name: "harvest";
|
|
624
|
+
readonly outputs: readonly [{
|
|
625
|
+
readonly internalType: "uint256";
|
|
626
|
+
readonly name: "";
|
|
627
|
+
readonly type: "uint256";
|
|
628
|
+
}];
|
|
629
|
+
readonly stateMutability: "payable";
|
|
630
|
+
readonly type: "function";
|
|
631
|
+
}, {
|
|
632
|
+
readonly inputs: readonly [{
|
|
633
|
+
readonly internalType: "address";
|
|
634
|
+
readonly name: "strategyContainer";
|
|
635
|
+
readonly type: "address";
|
|
636
|
+
}, {
|
|
637
|
+
readonly internalType: "address";
|
|
638
|
+
readonly name: "_gauge";
|
|
639
|
+
readonly type: "address";
|
|
640
|
+
}, {
|
|
641
|
+
readonly internalType: "uint256";
|
|
642
|
+
readonly name: "_enterMaxSlippage";
|
|
643
|
+
readonly type: "uint256";
|
|
644
|
+
}, {
|
|
645
|
+
readonly internalType: "uint256";
|
|
646
|
+
readonly name: "_exitMaxSlippage";
|
|
647
|
+
readonly type: "uint256";
|
|
648
|
+
}, {
|
|
649
|
+
readonly internalType: "uint256";
|
|
650
|
+
readonly name: "_emergencyExitMaxSlippage";
|
|
651
|
+
readonly type: "uint256";
|
|
652
|
+
}];
|
|
653
|
+
readonly name: "initialize";
|
|
654
|
+
readonly outputs: readonly [];
|
|
655
|
+
readonly stateMutability: "nonpayable";
|
|
656
|
+
readonly type: "function";
|
|
657
|
+
}, {
|
|
658
|
+
readonly inputs: readonly [];
|
|
659
|
+
readonly name: "isNavResolutionMode";
|
|
660
|
+
readonly outputs: readonly [{
|
|
661
|
+
readonly internalType: "bool";
|
|
662
|
+
readonly name: "";
|
|
663
|
+
readonly type: "bool";
|
|
664
|
+
}];
|
|
665
|
+
readonly stateMutability: "view";
|
|
666
|
+
readonly type: "function";
|
|
667
|
+
}, {
|
|
668
|
+
readonly inputs: readonly [];
|
|
669
|
+
readonly name: "lastStoredGaugeBalance";
|
|
670
|
+
readonly outputs: readonly [{
|
|
671
|
+
readonly internalType: "uint256";
|
|
672
|
+
readonly name: "";
|
|
673
|
+
readonly type: "uint256";
|
|
674
|
+
}];
|
|
675
|
+
readonly stateMutability: "view";
|
|
676
|
+
readonly type: "function";
|
|
677
|
+
}, {
|
|
678
|
+
readonly inputs: readonly [];
|
|
679
|
+
readonly name: "lastStoredVirtualPrice";
|
|
680
|
+
readonly outputs: readonly [{
|
|
681
|
+
readonly internalType: "uint256";
|
|
682
|
+
readonly name: "";
|
|
683
|
+
readonly type: "uint256";
|
|
684
|
+
}];
|
|
685
|
+
readonly stateMutability: "view";
|
|
686
|
+
readonly type: "function";
|
|
687
|
+
}, {
|
|
688
|
+
readonly inputs: readonly [];
|
|
689
|
+
readonly name: "lpToken";
|
|
690
|
+
readonly outputs: readonly [{
|
|
691
|
+
readonly internalType: "address";
|
|
692
|
+
readonly name: "";
|
|
693
|
+
readonly type: "address";
|
|
694
|
+
}];
|
|
695
|
+
readonly stateMutability: "view";
|
|
696
|
+
readonly type: "function";
|
|
697
|
+
}, {
|
|
698
|
+
readonly inputs: readonly [{
|
|
699
|
+
readonly internalType: "bytes32";
|
|
700
|
+
readonly name: "stateId";
|
|
701
|
+
readonly type: "bytes32";
|
|
702
|
+
}, {
|
|
703
|
+
readonly internalType: "uint256";
|
|
704
|
+
readonly name: "minNavDelta";
|
|
705
|
+
readonly type: "uint256";
|
|
706
|
+
}];
|
|
707
|
+
readonly name: "reenterToState";
|
|
708
|
+
readonly outputs: readonly [];
|
|
709
|
+
readonly stateMutability: "payable";
|
|
710
|
+
readonly type: "function";
|
|
711
|
+
}, {
|
|
712
|
+
readonly inputs: readonly [{
|
|
713
|
+
readonly internalType: "uint256";
|
|
714
|
+
readonly name: "_emergencyExitMaxSlippage";
|
|
715
|
+
readonly type: "uint256";
|
|
716
|
+
}];
|
|
717
|
+
readonly name: "setEmergencyExitMaxSlippage";
|
|
718
|
+
readonly outputs: readonly [];
|
|
719
|
+
readonly stateMutability: "nonpayable";
|
|
720
|
+
readonly type: "function";
|
|
721
|
+
}, {
|
|
722
|
+
readonly inputs: readonly [{
|
|
723
|
+
readonly internalType: "uint256";
|
|
724
|
+
readonly name: "_enterMaxSlippage";
|
|
725
|
+
readonly type: "uint256";
|
|
726
|
+
}];
|
|
727
|
+
readonly name: "setEnterMaxSlippage";
|
|
728
|
+
readonly outputs: readonly [];
|
|
729
|
+
readonly stateMutability: "nonpayable";
|
|
730
|
+
readonly type: "function";
|
|
731
|
+
}, {
|
|
732
|
+
readonly inputs: readonly [{
|
|
733
|
+
readonly internalType: "uint256";
|
|
734
|
+
readonly name: "_exitMaxSlippage";
|
|
735
|
+
readonly type: "uint256";
|
|
736
|
+
}];
|
|
737
|
+
readonly name: "setExitMaxSlippage";
|
|
738
|
+
readonly outputs: readonly [];
|
|
739
|
+
readonly stateMutability: "nonpayable";
|
|
740
|
+
readonly type: "function";
|
|
741
|
+
}, {
|
|
742
|
+
readonly inputs: readonly [{
|
|
743
|
+
readonly internalType: "address[]";
|
|
744
|
+
readonly name: "inputTokens";
|
|
745
|
+
readonly type: "address[]";
|
|
746
|
+
}];
|
|
747
|
+
readonly name: "setInputTokens";
|
|
748
|
+
readonly outputs: readonly [];
|
|
749
|
+
readonly stateMutability: "nonpayable";
|
|
750
|
+
readonly type: "function";
|
|
751
|
+
}, {
|
|
752
|
+
readonly inputs: readonly [{
|
|
753
|
+
readonly internalType: "address[]";
|
|
754
|
+
readonly name: "outputTokens";
|
|
755
|
+
readonly type: "address[]";
|
|
756
|
+
}];
|
|
757
|
+
readonly name: "setOutputTokens";
|
|
758
|
+
readonly outputs: readonly [];
|
|
759
|
+
readonly stateMutability: "nonpayable";
|
|
760
|
+
readonly type: "function";
|
|
761
|
+
}, {
|
|
762
|
+
readonly inputs: readonly [{
|
|
763
|
+
readonly internalType: "bytes32";
|
|
764
|
+
readonly name: "stateId";
|
|
765
|
+
readonly type: "bytes32";
|
|
766
|
+
}];
|
|
767
|
+
readonly name: "stateBitmask";
|
|
768
|
+
readonly outputs: readonly [{
|
|
769
|
+
readonly internalType: "uint256";
|
|
770
|
+
readonly name: "";
|
|
771
|
+
readonly type: "uint256";
|
|
772
|
+
}];
|
|
773
|
+
readonly stateMutability: "view";
|
|
774
|
+
readonly type: "function";
|
|
775
|
+
}, {
|
|
776
|
+
readonly inputs: readonly [{
|
|
777
|
+
readonly internalType: "bytes32";
|
|
778
|
+
readonly name: "stateId";
|
|
779
|
+
readonly type: "bytes32";
|
|
780
|
+
}];
|
|
781
|
+
readonly name: "stateNav";
|
|
782
|
+
readonly outputs: readonly [{
|
|
783
|
+
readonly internalType: "uint256";
|
|
784
|
+
readonly name: "";
|
|
785
|
+
readonly type: "uint256";
|
|
786
|
+
}];
|
|
787
|
+
readonly stateMutability: "view";
|
|
788
|
+
readonly type: "function";
|
|
789
|
+
}, {
|
|
790
|
+
readonly inputs: readonly [{
|
|
791
|
+
readonly internalType: "bytes32";
|
|
792
|
+
readonly name: "toStateId";
|
|
793
|
+
readonly type: "bytes32";
|
|
794
|
+
}, {
|
|
795
|
+
readonly internalType: "uint256";
|
|
796
|
+
readonly name: "share";
|
|
797
|
+
readonly type: "uint256";
|
|
798
|
+
}];
|
|
799
|
+
readonly name: "tryEmergencyExit";
|
|
800
|
+
readonly outputs: readonly [];
|
|
801
|
+
readonly stateMutability: "nonpayable";
|
|
802
|
+
readonly type: "function";
|
|
803
|
+
}, {
|
|
804
|
+
readonly inputs: readonly [];
|
|
805
|
+
readonly name: "underlyingAsset0";
|
|
806
|
+
readonly outputs: readonly [{
|
|
807
|
+
readonly internalType: "address";
|
|
808
|
+
readonly name: "";
|
|
809
|
+
readonly type: "address";
|
|
810
|
+
}];
|
|
811
|
+
readonly stateMutability: "view";
|
|
812
|
+
readonly type: "function";
|
|
813
|
+
}, {
|
|
814
|
+
readonly inputs: readonly [];
|
|
815
|
+
readonly name: "underlyingAsset1";
|
|
816
|
+
readonly outputs: readonly [{
|
|
817
|
+
readonly internalType: "address";
|
|
818
|
+
readonly name: "";
|
|
819
|
+
readonly type: "address";
|
|
820
|
+
}];
|
|
821
|
+
readonly stateMutability: "view";
|
|
822
|
+
readonly type: "function";
|
|
823
|
+
}];
|
|
824
|
+
/**
|
|
825
|
+
* Type-safe ABI for CurveGauge_json
|
|
826
|
+
*/
|
|
827
|
+
export type CurveGauge_jsonAbi = typeof CurveGauge_jsonAbi;
|
|
828
|
+
/**
|
|
829
|
+
* Contract instance type for CurveGauge_json
|
|
830
|
+
*/
|
|
831
|
+
export type CurveGauge_jsonContract = any;
|
|
832
|
+
/**
|
|
833
|
+
* CurveGauge_json Contract Class
|
|
834
|
+
*
|
|
835
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
836
|
+
*
|
|
837
|
+
* @example
|
|
838
|
+
* ```typescript
|
|
839
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
840
|
+
* import { mainnet } from 'viem/chains';
|
|
841
|
+
* import { CurveGauge_json } from 'CurveGauge_json';
|
|
842
|
+
*
|
|
843
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
844
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
845
|
+
*
|
|
846
|
+
* const contract = new CurveGauge_json('0x...', { publicClient, walletClient });
|
|
847
|
+
*
|
|
848
|
+
* // Read functions
|
|
849
|
+
* const result = await contract.balanceOf('0x...');
|
|
850
|
+
*
|
|
851
|
+
* // Write functions
|
|
852
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
853
|
+
*
|
|
854
|
+
* // Simulate transactions (dry-run)
|
|
855
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
856
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
857
|
+
*
|
|
858
|
+
* // Watch events
|
|
859
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
860
|
+
* console.log('Transfer event:', event);
|
|
861
|
+
* });
|
|
862
|
+
* ```
|
|
863
|
+
*/
|
|
864
|
+
export declare class CurveGauge_json {
|
|
865
|
+
private contract;
|
|
866
|
+
private contractAddress;
|
|
867
|
+
private publicClient;
|
|
868
|
+
constructor(address: Address, clients: {
|
|
869
|
+
publicClient: PublicClient;
|
|
870
|
+
walletClient?: WalletClient;
|
|
871
|
+
});
|
|
872
|
+
/**
|
|
873
|
+
* Get the contract address
|
|
874
|
+
*/
|
|
875
|
+
get address(): Address;
|
|
876
|
+
/**
|
|
877
|
+
* Get the underlying viem contract instance
|
|
878
|
+
*/
|
|
879
|
+
getContract(): CurveGauge_jsonContract;
|
|
880
|
+
/**
|
|
881
|
+
* currentStateId
|
|
882
|
+
* view
|
|
883
|
+
*/
|
|
884
|
+
currentStateId(): Promise<`0x${string}`>;
|
|
885
|
+
/**
|
|
886
|
+
* currentStateNav
|
|
887
|
+
* view
|
|
888
|
+
*/
|
|
889
|
+
currentStateNav(): Promise<bigint>;
|
|
890
|
+
/**
|
|
891
|
+
* emergencyExitMaxSlippage
|
|
892
|
+
* view
|
|
893
|
+
*/
|
|
894
|
+
emergencyExitMaxSlippage(): Promise<bigint>;
|
|
895
|
+
/**
|
|
896
|
+
* enterMaxSlippage
|
|
897
|
+
* view
|
|
898
|
+
*/
|
|
899
|
+
enterMaxSlippage(): Promise<bigint>;
|
|
900
|
+
/**
|
|
901
|
+
* exitMaxSlippage
|
|
902
|
+
* view
|
|
903
|
+
*/
|
|
904
|
+
exitMaxSlippage(): Promise<bigint>;
|
|
905
|
+
/**
|
|
906
|
+
* gauge
|
|
907
|
+
* view
|
|
908
|
+
*/
|
|
909
|
+
gauge(): Promise<`0x${string}`>;
|
|
910
|
+
/**
|
|
911
|
+
* getInputTokens
|
|
912
|
+
* view
|
|
913
|
+
*/
|
|
914
|
+
getInputTokens(): Promise<`0x${string}`[]>;
|
|
915
|
+
/**
|
|
916
|
+
* getOutputTokens
|
|
917
|
+
* view
|
|
918
|
+
*/
|
|
919
|
+
getOutputTokens(): Promise<`0x${string}`[]>;
|
|
920
|
+
/**
|
|
921
|
+
* getStateIds
|
|
922
|
+
* view
|
|
923
|
+
*/
|
|
924
|
+
getStateIds(): Promise<`0x${string}`[]>;
|
|
925
|
+
/**
|
|
926
|
+
* getTokenAmountInNotion
|
|
927
|
+
* view
|
|
928
|
+
*/
|
|
929
|
+
getTokenAmountInNotion(token: `0x${string}`, amount: bigint): Promise<bigint>;
|
|
930
|
+
/**
|
|
931
|
+
* isNavResolutionMode
|
|
932
|
+
* view
|
|
933
|
+
*/
|
|
934
|
+
isNavResolutionMode(): Promise<boolean>;
|
|
935
|
+
/**
|
|
936
|
+
* lastStoredGaugeBalance
|
|
937
|
+
* view
|
|
938
|
+
*/
|
|
939
|
+
lastStoredGaugeBalance(): Promise<bigint>;
|
|
940
|
+
/**
|
|
941
|
+
* lastStoredVirtualPrice
|
|
942
|
+
* view
|
|
943
|
+
*/
|
|
944
|
+
lastStoredVirtualPrice(): Promise<bigint>;
|
|
945
|
+
/**
|
|
946
|
+
* lpToken
|
|
947
|
+
* view
|
|
948
|
+
*/
|
|
949
|
+
lpToken(): Promise<`0x${string}`>;
|
|
950
|
+
/**
|
|
951
|
+
* stateBitmask
|
|
952
|
+
* view
|
|
953
|
+
*/
|
|
954
|
+
stateBitmask(stateId: `0x${string}`): Promise<bigint>;
|
|
955
|
+
/**
|
|
956
|
+
* stateNav
|
|
957
|
+
* view
|
|
958
|
+
*/
|
|
959
|
+
stateNav(stateId: `0x${string}`): Promise<bigint>;
|
|
960
|
+
/**
|
|
961
|
+
* underlyingAsset0
|
|
962
|
+
* view
|
|
963
|
+
*/
|
|
964
|
+
underlyingAsset0(): Promise<`0x${string}`>;
|
|
965
|
+
/**
|
|
966
|
+
* underlyingAsset1
|
|
967
|
+
* view
|
|
968
|
+
*/
|
|
969
|
+
underlyingAsset1(): Promise<`0x${string}`>;
|
|
970
|
+
/**
|
|
971
|
+
* acceptNav
|
|
972
|
+
* nonpayable
|
|
973
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
974
|
+
*/
|
|
975
|
+
acceptNav(acceptedStateId: `0x${string}`, options?: {
|
|
976
|
+
accessList?: import('viem').AccessList;
|
|
977
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
978
|
+
chain?: import('viem').Chain | null;
|
|
979
|
+
dataSuffix?: `0x${string}`;
|
|
980
|
+
gas?: bigint;
|
|
981
|
+
gasPrice?: bigint;
|
|
982
|
+
maxFeePerGas?: bigint;
|
|
983
|
+
maxPriorityFeePerGas?: bigint;
|
|
984
|
+
nonce?: number;
|
|
985
|
+
value?: bigint;
|
|
986
|
+
}): Promise<`0x${string}`>;
|
|
987
|
+
/**
|
|
988
|
+
* emergencyExit
|
|
989
|
+
* payable
|
|
990
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
991
|
+
*/
|
|
992
|
+
emergencyExit(toStateId: `0x${string}`, share: bigint, minNavDelta: bigint, options?: {
|
|
993
|
+
accessList?: import('viem').AccessList;
|
|
994
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
995
|
+
chain?: import('viem').Chain | null;
|
|
996
|
+
dataSuffix?: `0x${string}`;
|
|
997
|
+
gas?: bigint;
|
|
998
|
+
gasPrice?: bigint;
|
|
999
|
+
maxFeePerGas?: bigint;
|
|
1000
|
+
maxPriorityFeePerGas?: bigint;
|
|
1001
|
+
nonce?: number;
|
|
1002
|
+
value?: bigint;
|
|
1003
|
+
}): Promise<`0x${string}`>;
|
|
1004
|
+
/**
|
|
1005
|
+
* enter
|
|
1006
|
+
* payable
|
|
1007
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1008
|
+
*/
|
|
1009
|
+
enter(amounts: bigint[], minNavDelta: bigint, options?: {
|
|
1010
|
+
accessList?: import('viem').AccessList;
|
|
1011
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1012
|
+
chain?: import('viem').Chain | null;
|
|
1013
|
+
dataSuffix?: `0x${string}`;
|
|
1014
|
+
gas?: bigint;
|
|
1015
|
+
gasPrice?: bigint;
|
|
1016
|
+
maxFeePerGas?: bigint;
|
|
1017
|
+
maxPriorityFeePerGas?: bigint;
|
|
1018
|
+
nonce?: number;
|
|
1019
|
+
value?: bigint;
|
|
1020
|
+
}): Promise<`0x${string}`>;
|
|
1021
|
+
/**
|
|
1022
|
+
* exit
|
|
1023
|
+
* payable
|
|
1024
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1025
|
+
*/
|
|
1026
|
+
exit(share: bigint, maxNavDelta: bigint, options?: {
|
|
1027
|
+
accessList?: import('viem').AccessList;
|
|
1028
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1029
|
+
chain?: import('viem').Chain | null;
|
|
1030
|
+
dataSuffix?: `0x${string}`;
|
|
1031
|
+
gas?: bigint;
|
|
1032
|
+
gasPrice?: bigint;
|
|
1033
|
+
maxFeePerGas?: bigint;
|
|
1034
|
+
maxPriorityFeePerGas?: bigint;
|
|
1035
|
+
nonce?: number;
|
|
1036
|
+
value?: bigint;
|
|
1037
|
+
}): Promise<`0x${string}`>;
|
|
1038
|
+
/**
|
|
1039
|
+
* harvest
|
|
1040
|
+
* payable
|
|
1041
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1042
|
+
*/
|
|
1043
|
+
harvest(options?: {
|
|
1044
|
+
accessList?: import('viem').AccessList;
|
|
1045
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1046
|
+
chain?: import('viem').Chain | null;
|
|
1047
|
+
dataSuffix?: `0x${string}`;
|
|
1048
|
+
gas?: bigint;
|
|
1049
|
+
gasPrice?: bigint;
|
|
1050
|
+
maxFeePerGas?: bigint;
|
|
1051
|
+
maxPriorityFeePerGas?: bigint;
|
|
1052
|
+
nonce?: number;
|
|
1053
|
+
value?: bigint;
|
|
1054
|
+
}): Promise<`0x${string}`>;
|
|
1055
|
+
/**
|
|
1056
|
+
* initialize
|
|
1057
|
+
* nonpayable
|
|
1058
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1059
|
+
*/
|
|
1060
|
+
initialize(strategyContainer: `0x${string}`, _gauge: `0x${string}`, _enterMaxSlippage: bigint, _exitMaxSlippage: bigint, _emergencyExitMaxSlippage: bigint, options?: {
|
|
1061
|
+
accessList?: import('viem').AccessList;
|
|
1062
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1063
|
+
chain?: import('viem').Chain | null;
|
|
1064
|
+
dataSuffix?: `0x${string}`;
|
|
1065
|
+
gas?: bigint;
|
|
1066
|
+
gasPrice?: bigint;
|
|
1067
|
+
maxFeePerGas?: bigint;
|
|
1068
|
+
maxPriorityFeePerGas?: bigint;
|
|
1069
|
+
nonce?: number;
|
|
1070
|
+
value?: bigint;
|
|
1071
|
+
}): Promise<`0x${string}`>;
|
|
1072
|
+
/**
|
|
1073
|
+
* reenterToState
|
|
1074
|
+
* payable
|
|
1075
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1076
|
+
*/
|
|
1077
|
+
reenterToState(stateId: `0x${string}`, minNavDelta: bigint, options?: {
|
|
1078
|
+
accessList?: import('viem').AccessList;
|
|
1079
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1080
|
+
chain?: import('viem').Chain | null;
|
|
1081
|
+
dataSuffix?: `0x${string}`;
|
|
1082
|
+
gas?: bigint;
|
|
1083
|
+
gasPrice?: bigint;
|
|
1084
|
+
maxFeePerGas?: bigint;
|
|
1085
|
+
maxPriorityFeePerGas?: bigint;
|
|
1086
|
+
nonce?: number;
|
|
1087
|
+
value?: bigint;
|
|
1088
|
+
}): Promise<`0x${string}`>;
|
|
1089
|
+
/**
|
|
1090
|
+
* setEmergencyExitMaxSlippage
|
|
1091
|
+
* nonpayable
|
|
1092
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1093
|
+
*/
|
|
1094
|
+
setEmergencyExitMaxSlippage(_emergencyExitMaxSlippage: bigint, options?: {
|
|
1095
|
+
accessList?: import('viem').AccessList;
|
|
1096
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1097
|
+
chain?: import('viem').Chain | null;
|
|
1098
|
+
dataSuffix?: `0x${string}`;
|
|
1099
|
+
gas?: bigint;
|
|
1100
|
+
gasPrice?: bigint;
|
|
1101
|
+
maxFeePerGas?: bigint;
|
|
1102
|
+
maxPriorityFeePerGas?: bigint;
|
|
1103
|
+
nonce?: number;
|
|
1104
|
+
value?: bigint;
|
|
1105
|
+
}): Promise<`0x${string}`>;
|
|
1106
|
+
/**
|
|
1107
|
+
* setEnterMaxSlippage
|
|
1108
|
+
* nonpayable
|
|
1109
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1110
|
+
*/
|
|
1111
|
+
setEnterMaxSlippage(_enterMaxSlippage: bigint, options?: {
|
|
1112
|
+
accessList?: import('viem').AccessList;
|
|
1113
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1114
|
+
chain?: import('viem').Chain | null;
|
|
1115
|
+
dataSuffix?: `0x${string}`;
|
|
1116
|
+
gas?: bigint;
|
|
1117
|
+
gasPrice?: bigint;
|
|
1118
|
+
maxFeePerGas?: bigint;
|
|
1119
|
+
maxPriorityFeePerGas?: bigint;
|
|
1120
|
+
nonce?: number;
|
|
1121
|
+
value?: bigint;
|
|
1122
|
+
}): Promise<`0x${string}`>;
|
|
1123
|
+
/**
|
|
1124
|
+
* setExitMaxSlippage
|
|
1125
|
+
* nonpayable
|
|
1126
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1127
|
+
*/
|
|
1128
|
+
setExitMaxSlippage(_exitMaxSlippage: bigint, options?: {
|
|
1129
|
+
accessList?: import('viem').AccessList;
|
|
1130
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1131
|
+
chain?: import('viem').Chain | null;
|
|
1132
|
+
dataSuffix?: `0x${string}`;
|
|
1133
|
+
gas?: bigint;
|
|
1134
|
+
gasPrice?: bigint;
|
|
1135
|
+
maxFeePerGas?: bigint;
|
|
1136
|
+
maxPriorityFeePerGas?: bigint;
|
|
1137
|
+
nonce?: number;
|
|
1138
|
+
value?: bigint;
|
|
1139
|
+
}): Promise<`0x${string}`>;
|
|
1140
|
+
/**
|
|
1141
|
+
* setInputTokens
|
|
1142
|
+
* nonpayable
|
|
1143
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1144
|
+
*/
|
|
1145
|
+
setInputTokens(inputTokens: `0x${string}`[], options?: {
|
|
1146
|
+
accessList?: import('viem').AccessList;
|
|
1147
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1148
|
+
chain?: import('viem').Chain | null;
|
|
1149
|
+
dataSuffix?: `0x${string}`;
|
|
1150
|
+
gas?: bigint;
|
|
1151
|
+
gasPrice?: bigint;
|
|
1152
|
+
maxFeePerGas?: bigint;
|
|
1153
|
+
maxPriorityFeePerGas?: bigint;
|
|
1154
|
+
nonce?: number;
|
|
1155
|
+
value?: bigint;
|
|
1156
|
+
}): Promise<`0x${string}`>;
|
|
1157
|
+
/**
|
|
1158
|
+
* setOutputTokens
|
|
1159
|
+
* nonpayable
|
|
1160
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1161
|
+
*/
|
|
1162
|
+
setOutputTokens(outputTokens: `0x${string}`[], options?: {
|
|
1163
|
+
accessList?: import('viem').AccessList;
|
|
1164
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1165
|
+
chain?: import('viem').Chain | null;
|
|
1166
|
+
dataSuffix?: `0x${string}`;
|
|
1167
|
+
gas?: bigint;
|
|
1168
|
+
gasPrice?: bigint;
|
|
1169
|
+
maxFeePerGas?: bigint;
|
|
1170
|
+
maxPriorityFeePerGas?: bigint;
|
|
1171
|
+
nonce?: number;
|
|
1172
|
+
value?: bigint;
|
|
1173
|
+
}): Promise<`0x${string}`>;
|
|
1174
|
+
/**
|
|
1175
|
+
* tryEmergencyExit
|
|
1176
|
+
* nonpayable
|
|
1177
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1178
|
+
*/
|
|
1179
|
+
tryEmergencyExit(toStateId: `0x${string}`, share: bigint, options?: {
|
|
1180
|
+
accessList?: import('viem').AccessList;
|
|
1181
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1182
|
+
chain?: import('viem').Chain | null;
|
|
1183
|
+
dataSuffix?: `0x${string}`;
|
|
1184
|
+
gas?: bigint;
|
|
1185
|
+
gasPrice?: bigint;
|
|
1186
|
+
maxFeePerGas?: bigint;
|
|
1187
|
+
maxPriorityFeePerGas?: bigint;
|
|
1188
|
+
nonce?: number;
|
|
1189
|
+
value?: bigint;
|
|
1190
|
+
}): Promise<`0x${string}`>;
|
|
1191
|
+
/**
|
|
1192
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1193
|
+
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1196
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1197
|
+
* console.log('Would succeed:', result.result);
|
|
1198
|
+
*/
|
|
1199
|
+
get simulate(): {
|
|
1200
|
+
/**
|
|
1201
|
+
* Simulate acceptNav
|
|
1202
|
+
* Returns gas estimate and result without sending transaction
|
|
1203
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1204
|
+
*/
|
|
1205
|
+
acceptNav(acceptedStateId: `0x${string}`, options?: {
|
|
1206
|
+
accessList?: import("viem").AccessList;
|
|
1207
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1208
|
+
chain?: import("viem").Chain | null;
|
|
1209
|
+
dataSuffix?: `0x${string}`;
|
|
1210
|
+
gas?: bigint;
|
|
1211
|
+
gasPrice?: bigint;
|
|
1212
|
+
maxFeePerGas?: bigint;
|
|
1213
|
+
maxPriorityFeePerGas?: bigint;
|
|
1214
|
+
nonce?: number;
|
|
1215
|
+
value?: bigint;
|
|
1216
|
+
}): Promise<bigint>;
|
|
1217
|
+
/**
|
|
1218
|
+
* Simulate emergencyExit
|
|
1219
|
+
* Returns gas estimate and result without sending transaction
|
|
1220
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1221
|
+
*/
|
|
1222
|
+
emergencyExit(toStateId: `0x${string}`, share: bigint, minNavDelta: bigint, options?: {
|
|
1223
|
+
accessList?: import("viem").AccessList;
|
|
1224
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1225
|
+
chain?: import("viem").Chain | null;
|
|
1226
|
+
dataSuffix?: `0x${string}`;
|
|
1227
|
+
gas?: bigint;
|
|
1228
|
+
gasPrice?: bigint;
|
|
1229
|
+
maxFeePerGas?: bigint;
|
|
1230
|
+
maxPriorityFeePerGas?: bigint;
|
|
1231
|
+
nonce?: number;
|
|
1232
|
+
value?: bigint;
|
|
1233
|
+
}): Promise<void>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Simulate enter
|
|
1236
|
+
* Returns gas estimate and result without sending transaction
|
|
1237
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1238
|
+
*/
|
|
1239
|
+
enter(amounts: bigint[], minNavDelta: bigint, options?: {
|
|
1240
|
+
accessList?: import("viem").AccessList;
|
|
1241
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1242
|
+
chain?: import("viem").Chain | null;
|
|
1243
|
+
dataSuffix?: `0x${string}`;
|
|
1244
|
+
gas?: bigint;
|
|
1245
|
+
gasPrice?: bigint;
|
|
1246
|
+
maxFeePerGas?: bigint;
|
|
1247
|
+
maxPriorityFeePerGas?: bigint;
|
|
1248
|
+
nonce?: number;
|
|
1249
|
+
value?: bigint;
|
|
1250
|
+
}): Promise<[bigint, boolean, bigint[]]>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Simulate exit
|
|
1253
|
+
* Returns gas estimate and result without sending transaction
|
|
1254
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1255
|
+
*/
|
|
1256
|
+
exit(share: bigint, maxNavDelta: bigint, options?: {
|
|
1257
|
+
accessList?: import("viem").AccessList;
|
|
1258
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1259
|
+
chain?: import("viem").Chain | null;
|
|
1260
|
+
dataSuffix?: `0x${string}`;
|
|
1261
|
+
gas?: bigint;
|
|
1262
|
+
gasPrice?: bigint;
|
|
1263
|
+
maxFeePerGas?: bigint;
|
|
1264
|
+
maxPriorityFeePerGas?: bigint;
|
|
1265
|
+
nonce?: number;
|
|
1266
|
+
value?: bigint;
|
|
1267
|
+
}): Promise<[`0x${string}`[], bigint[]]>;
|
|
1268
|
+
/**
|
|
1269
|
+
* Simulate harvest
|
|
1270
|
+
* Returns gas estimate and result without sending transaction
|
|
1271
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1272
|
+
*/
|
|
1273
|
+
harvest(options?: {
|
|
1274
|
+
accessList?: import("viem").AccessList;
|
|
1275
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1276
|
+
chain?: import("viem").Chain | null;
|
|
1277
|
+
dataSuffix?: `0x${string}`;
|
|
1278
|
+
gas?: bigint;
|
|
1279
|
+
gasPrice?: bigint;
|
|
1280
|
+
maxFeePerGas?: bigint;
|
|
1281
|
+
maxPriorityFeePerGas?: bigint;
|
|
1282
|
+
nonce?: number;
|
|
1283
|
+
value?: bigint;
|
|
1284
|
+
}): Promise<bigint>;
|
|
1285
|
+
/**
|
|
1286
|
+
* Simulate initialize
|
|
1287
|
+
* Returns gas estimate and result without sending transaction
|
|
1288
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1289
|
+
*/
|
|
1290
|
+
initialize(strategyContainer: `0x${string}`, _gauge: `0x${string}`, _enterMaxSlippage: bigint, _exitMaxSlippage: bigint, _emergencyExitMaxSlippage: bigint, options?: {
|
|
1291
|
+
accessList?: import("viem").AccessList;
|
|
1292
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1293
|
+
chain?: import("viem").Chain | null;
|
|
1294
|
+
dataSuffix?: `0x${string}`;
|
|
1295
|
+
gas?: bigint;
|
|
1296
|
+
gasPrice?: bigint;
|
|
1297
|
+
maxFeePerGas?: bigint;
|
|
1298
|
+
maxPriorityFeePerGas?: bigint;
|
|
1299
|
+
nonce?: number;
|
|
1300
|
+
value?: bigint;
|
|
1301
|
+
}): Promise<void>;
|
|
1302
|
+
/**
|
|
1303
|
+
* Simulate reenterToState
|
|
1304
|
+
* Returns gas estimate and result without sending transaction
|
|
1305
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1306
|
+
*/
|
|
1307
|
+
reenterToState(stateId: `0x${string}`, minNavDelta: bigint, options?: {
|
|
1308
|
+
accessList?: import("viem").AccessList;
|
|
1309
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1310
|
+
chain?: import("viem").Chain | null;
|
|
1311
|
+
dataSuffix?: `0x${string}`;
|
|
1312
|
+
gas?: bigint;
|
|
1313
|
+
gasPrice?: bigint;
|
|
1314
|
+
maxFeePerGas?: bigint;
|
|
1315
|
+
maxPriorityFeePerGas?: bigint;
|
|
1316
|
+
nonce?: number;
|
|
1317
|
+
value?: bigint;
|
|
1318
|
+
}): Promise<void>;
|
|
1319
|
+
/**
|
|
1320
|
+
* Simulate setEmergencyExitMaxSlippage
|
|
1321
|
+
* Returns gas estimate and result without sending transaction
|
|
1322
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1323
|
+
*/
|
|
1324
|
+
setEmergencyExitMaxSlippage(_emergencyExitMaxSlippage: bigint, options?: {
|
|
1325
|
+
accessList?: import("viem").AccessList;
|
|
1326
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1327
|
+
chain?: import("viem").Chain | null;
|
|
1328
|
+
dataSuffix?: `0x${string}`;
|
|
1329
|
+
gas?: bigint;
|
|
1330
|
+
gasPrice?: bigint;
|
|
1331
|
+
maxFeePerGas?: bigint;
|
|
1332
|
+
maxPriorityFeePerGas?: bigint;
|
|
1333
|
+
nonce?: number;
|
|
1334
|
+
value?: bigint;
|
|
1335
|
+
}): Promise<void>;
|
|
1336
|
+
/**
|
|
1337
|
+
* Simulate setEnterMaxSlippage
|
|
1338
|
+
* Returns gas estimate and result without sending transaction
|
|
1339
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1340
|
+
*/
|
|
1341
|
+
setEnterMaxSlippage(_enterMaxSlippage: bigint, options?: {
|
|
1342
|
+
accessList?: import("viem").AccessList;
|
|
1343
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1344
|
+
chain?: import("viem").Chain | null;
|
|
1345
|
+
dataSuffix?: `0x${string}`;
|
|
1346
|
+
gas?: bigint;
|
|
1347
|
+
gasPrice?: bigint;
|
|
1348
|
+
maxFeePerGas?: bigint;
|
|
1349
|
+
maxPriorityFeePerGas?: bigint;
|
|
1350
|
+
nonce?: number;
|
|
1351
|
+
value?: bigint;
|
|
1352
|
+
}): Promise<void>;
|
|
1353
|
+
/**
|
|
1354
|
+
* Simulate setExitMaxSlippage
|
|
1355
|
+
* Returns gas estimate and result without sending transaction
|
|
1356
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1357
|
+
*/
|
|
1358
|
+
setExitMaxSlippage(_exitMaxSlippage: bigint, options?: {
|
|
1359
|
+
accessList?: import("viem").AccessList;
|
|
1360
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1361
|
+
chain?: import("viem").Chain | null;
|
|
1362
|
+
dataSuffix?: `0x${string}`;
|
|
1363
|
+
gas?: bigint;
|
|
1364
|
+
gasPrice?: bigint;
|
|
1365
|
+
maxFeePerGas?: bigint;
|
|
1366
|
+
maxPriorityFeePerGas?: bigint;
|
|
1367
|
+
nonce?: number;
|
|
1368
|
+
value?: bigint;
|
|
1369
|
+
}): Promise<void>;
|
|
1370
|
+
/**
|
|
1371
|
+
* Simulate setInputTokens
|
|
1372
|
+
* Returns gas estimate and result without sending transaction
|
|
1373
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1374
|
+
*/
|
|
1375
|
+
setInputTokens(inputTokens: `0x${string}`[], options?: {
|
|
1376
|
+
accessList?: import("viem").AccessList;
|
|
1377
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1378
|
+
chain?: import("viem").Chain | null;
|
|
1379
|
+
dataSuffix?: `0x${string}`;
|
|
1380
|
+
gas?: bigint;
|
|
1381
|
+
gasPrice?: bigint;
|
|
1382
|
+
maxFeePerGas?: bigint;
|
|
1383
|
+
maxPriorityFeePerGas?: bigint;
|
|
1384
|
+
nonce?: number;
|
|
1385
|
+
value?: bigint;
|
|
1386
|
+
}): Promise<void>;
|
|
1387
|
+
/**
|
|
1388
|
+
* Simulate setOutputTokens
|
|
1389
|
+
* Returns gas estimate and result without sending transaction
|
|
1390
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1391
|
+
*/
|
|
1392
|
+
setOutputTokens(outputTokens: `0x${string}`[], options?: {
|
|
1393
|
+
accessList?: import("viem").AccessList;
|
|
1394
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1395
|
+
chain?: import("viem").Chain | null;
|
|
1396
|
+
dataSuffix?: `0x${string}`;
|
|
1397
|
+
gas?: bigint;
|
|
1398
|
+
gasPrice?: bigint;
|
|
1399
|
+
maxFeePerGas?: bigint;
|
|
1400
|
+
maxPriorityFeePerGas?: bigint;
|
|
1401
|
+
nonce?: number;
|
|
1402
|
+
value?: bigint;
|
|
1403
|
+
}): Promise<void>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Simulate tryEmergencyExit
|
|
1406
|
+
* Returns gas estimate and result without sending transaction
|
|
1407
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1408
|
+
*/
|
|
1409
|
+
tryEmergencyExit(toStateId: `0x${string}`, share: bigint, options?: {
|
|
1410
|
+
accessList?: import("viem").AccessList;
|
|
1411
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1412
|
+
chain?: import("viem").Chain | null;
|
|
1413
|
+
dataSuffix?: `0x${string}`;
|
|
1414
|
+
gas?: bigint;
|
|
1415
|
+
gasPrice?: bigint;
|
|
1416
|
+
maxFeePerGas?: bigint;
|
|
1417
|
+
maxPriorityFeePerGas?: bigint;
|
|
1418
|
+
nonce?: number;
|
|
1419
|
+
value?: bigint;
|
|
1420
|
+
}): Promise<void>;
|
|
1421
|
+
};
|
|
1422
|
+
/**
|
|
1423
|
+
* Watch contract events
|
|
1424
|
+
*
|
|
1425
|
+
* @example
|
|
1426
|
+
* // Watch all Transfer events
|
|
1427
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1428
|
+
* console.log('Transfer:', event);
|
|
1429
|
+
* });
|
|
1430
|
+
*
|
|
1431
|
+
* // Stop watching
|
|
1432
|
+
* unwatch();
|
|
1433
|
+
*/
|
|
1434
|
+
get watch(): {
|
|
1435
|
+
/**
|
|
1436
|
+
* Watch EmergencyExitFailed events
|
|
1437
|
+
* @param callback Function to call when event is emitted
|
|
1438
|
+
* @param filter Optional filter for indexed parameters
|
|
1439
|
+
* @returns Unwatch function to stop listening
|
|
1440
|
+
*/
|
|
1441
|
+
EmergencyExitFailed: (callback: (event: {
|
|
1442
|
+
toStateId: `0x${string}`;
|
|
1443
|
+
}) => void) => () => void;
|
|
1444
|
+
/**
|
|
1445
|
+
* Watch EmergencyExitMaxSlippageUpdated events
|
|
1446
|
+
* @param callback Function to call when event is emitted
|
|
1447
|
+
* @param filter Optional filter for indexed parameters
|
|
1448
|
+
* @returns Unwatch function to stop listening
|
|
1449
|
+
*/
|
|
1450
|
+
EmergencyExitMaxSlippageUpdated: (callback: (event: {
|
|
1451
|
+
oldEmergencyExitMaxSlippage: bigint;
|
|
1452
|
+
newEmergencyExitMaxSlippage: bigint;
|
|
1453
|
+
}) => void) => () => void;
|
|
1454
|
+
/**
|
|
1455
|
+
* Watch EmergencyExitSucceeded events
|
|
1456
|
+
* @param callback Function to call when event is emitted
|
|
1457
|
+
* @param filter Optional filter for indexed parameters
|
|
1458
|
+
* @returns Unwatch function to stop listening
|
|
1459
|
+
*/
|
|
1460
|
+
EmergencyExitSucceeded: (callback: (event: {
|
|
1461
|
+
toStateId: `0x${string}`;
|
|
1462
|
+
}) => void) => () => void;
|
|
1463
|
+
/**
|
|
1464
|
+
* Watch EmergencyExited events
|
|
1465
|
+
* @param callback Function to call when event is emitted
|
|
1466
|
+
* @param filter Optional filter for indexed parameters
|
|
1467
|
+
* @returns Unwatch function to stop listening
|
|
1468
|
+
*/
|
|
1469
|
+
EmergencyExited: (callback: (event: {
|
|
1470
|
+
toStateId: `0x${string}`;
|
|
1471
|
+
}) => void) => () => void;
|
|
1472
|
+
/**
|
|
1473
|
+
* Watch EmergencyModeUpdated events
|
|
1474
|
+
* @param callback Function to call when event is emitted
|
|
1475
|
+
* @param filter Optional filter for indexed parameters
|
|
1476
|
+
* @returns Unwatch function to stop listening
|
|
1477
|
+
*/
|
|
1478
|
+
EmergencyModeUpdated: (callback: (event: {
|
|
1479
|
+
isEmergencyMode: boolean;
|
|
1480
|
+
}) => void) => () => void;
|
|
1481
|
+
/**
|
|
1482
|
+
* Watch EnterMaxSlippageUpdated events
|
|
1483
|
+
* @param callback Function to call when event is emitted
|
|
1484
|
+
* @param filter Optional filter for indexed parameters
|
|
1485
|
+
* @returns Unwatch function to stop listening
|
|
1486
|
+
*/
|
|
1487
|
+
EnterMaxSlippageUpdated: (callback: (event: {
|
|
1488
|
+
oldEnterMaxSlippage: bigint;
|
|
1489
|
+
newEnterMaxSlippage: bigint;
|
|
1490
|
+
}) => void) => () => void;
|
|
1491
|
+
/**
|
|
1492
|
+
* Watch Entered events
|
|
1493
|
+
* @param callback Function to call when event is emitted
|
|
1494
|
+
* @param filter Optional filter for indexed parameters
|
|
1495
|
+
* @returns Unwatch function to stop listening
|
|
1496
|
+
*/
|
|
1497
|
+
Entered: (callback: (event: {
|
|
1498
|
+
navBefore: bigint;
|
|
1499
|
+
navAfter: bigint;
|
|
1500
|
+
hasRemainder: boolean;
|
|
1501
|
+
}) => void) => () => void;
|
|
1502
|
+
/**
|
|
1503
|
+
* Watch ExitMaxSlippageUpdated events
|
|
1504
|
+
* @param callback Function to call when event is emitted
|
|
1505
|
+
* @param filter Optional filter for indexed parameters
|
|
1506
|
+
* @returns Unwatch function to stop listening
|
|
1507
|
+
*/
|
|
1508
|
+
ExitMaxSlippageUpdated: (callback: (event: {
|
|
1509
|
+
oldExitMaxSlippage: bigint;
|
|
1510
|
+
newExitMaxSlippage: bigint;
|
|
1511
|
+
}) => void) => () => void;
|
|
1512
|
+
/**
|
|
1513
|
+
* Watch Exited events
|
|
1514
|
+
* @param callback Function to call when event is emitted
|
|
1515
|
+
* @param filter Optional filter for indexed parameters
|
|
1516
|
+
* @returns Unwatch function to stop listening
|
|
1517
|
+
*/
|
|
1518
|
+
Exited: (callback: (event: {
|
|
1519
|
+
navBefore: bigint;
|
|
1520
|
+
navAfter: bigint;
|
|
1521
|
+
stateId: `0x${string}`;
|
|
1522
|
+
}) => void) => () => void;
|
|
1523
|
+
/**
|
|
1524
|
+
* Watch Harvested events
|
|
1525
|
+
* @param callback Function to call when event is emitted
|
|
1526
|
+
* @param filter Optional filter for indexed parameters
|
|
1527
|
+
* @returns Unwatch function to stop listening
|
|
1528
|
+
*/
|
|
1529
|
+
Harvested: (callback: (event: {
|
|
1530
|
+
stateId: `0x${string}`;
|
|
1531
|
+
navAfter: bigint;
|
|
1532
|
+
}) => void) => () => void;
|
|
1533
|
+
/**
|
|
1534
|
+
* Watch Initialized events
|
|
1535
|
+
* @param callback Function to call when event is emitted
|
|
1536
|
+
* @param filter Optional filter for indexed parameters
|
|
1537
|
+
* @returns Unwatch function to stop listening
|
|
1538
|
+
*/
|
|
1539
|
+
Initialized: (callback: (event: {
|
|
1540
|
+
version: bigint;
|
|
1541
|
+
}) => void) => () => void;
|
|
1542
|
+
/**
|
|
1543
|
+
* Watch InputTokenSet events
|
|
1544
|
+
* @param callback Function to call when event is emitted
|
|
1545
|
+
* @param filter Optional filter for indexed parameters
|
|
1546
|
+
* @returns Unwatch function to stop listening
|
|
1547
|
+
*/
|
|
1548
|
+
InputTokenSet: (callback: (event: {
|
|
1549
|
+
arg0: `0x${string}`;
|
|
1550
|
+
}) => void) => () => void;
|
|
1551
|
+
/**
|
|
1552
|
+
* Watch NavResolutionModeUpdated events
|
|
1553
|
+
* @param callback Function to call when event is emitted
|
|
1554
|
+
* @param filter Optional filter for indexed parameters
|
|
1555
|
+
* @returns Unwatch function to stop listening
|
|
1556
|
+
*/
|
|
1557
|
+
NavResolutionModeUpdated: (callback: (event: {
|
|
1558
|
+
isNavResolutionMode: boolean;
|
|
1559
|
+
}) => void) => () => void;
|
|
1560
|
+
/**
|
|
1561
|
+
* Watch OutputTokenSet events
|
|
1562
|
+
* @param callback Function to call when event is emitted
|
|
1563
|
+
* @param filter Optional filter for indexed parameters
|
|
1564
|
+
* @returns Unwatch function to stop listening
|
|
1565
|
+
*/
|
|
1566
|
+
OutputTokenSet: (callback: (event: {
|
|
1567
|
+
arg0: `0x${string}`;
|
|
1568
|
+
}) => void) => () => void;
|
|
1569
|
+
/**
|
|
1570
|
+
* Watch ReenteredToState events
|
|
1571
|
+
* @param callback Function to call when event is emitted
|
|
1572
|
+
* @param filter Optional filter for indexed parameters
|
|
1573
|
+
* @returns Unwatch function to stop listening
|
|
1574
|
+
*/
|
|
1575
|
+
ReenteredToState: (callback: (event: {
|
|
1576
|
+
stateId: `0x${string}`;
|
|
1577
|
+
}) => void) => () => void;
|
|
1578
|
+
/**
|
|
1579
|
+
* Watch StateUpdated events
|
|
1580
|
+
* @param callback Function to call when event is emitted
|
|
1581
|
+
* @param filter Optional filter for indexed parameters
|
|
1582
|
+
* @returns Unwatch function to stop listening
|
|
1583
|
+
*/
|
|
1584
|
+
StateUpdated: (callback: (event: {
|
|
1585
|
+
oldStateId: `0x${string}`;
|
|
1586
|
+
newStateId: `0x${string}`;
|
|
1587
|
+
newStateBitmask: bigint;
|
|
1588
|
+
}) => void) => () => void;
|
|
1589
|
+
};
|
|
1590
|
+
}
|