@gitmyabi/upgradeablelockreleasetokenpool 0.0.0-stage → 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 +107 -2
- package/contracts/TransparentUpgradeableProxy.d.ts +185 -0
- package/contracts/TransparentUpgradeableProxy.js +238 -0
- package/contracts/TransparentUpgradeableProxy.ts +268 -0
- package/contracts/UpgradeableLockReleaseTokenPool.d.ts +2557 -0
- package/contracts/UpgradeableLockReleaseTokenPool.js +2852 -0
- package/contracts/UpgradeableLockReleaseTokenPool.ts +3421 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,3421 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* RateLimiter.Config struct type
|
|
7
|
+
*/
|
|
8
|
+
export type RateLimiter_Config = {
|
|
9
|
+
isEnabled: boolean;
|
|
10
|
+
capacity: bigint;
|
|
11
|
+
rate: bigint;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* UpgradeableTokenPool.ChainUpdate struct type
|
|
16
|
+
*/
|
|
17
|
+
export type UpgradeableTokenPool_ChainUpdate = {
|
|
18
|
+
remoteChainSelector: bigint;
|
|
19
|
+
remotePoolAddresses: `0x${string}`[];
|
|
20
|
+
remoteTokenAddress: `0x${string}`;
|
|
21
|
+
outboundRateLimiterConfig: RateLimiter_Config;
|
|
22
|
+
inboundRateLimiterConfig: RateLimiter_Config;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* RateLimiter.TokenBucket struct type
|
|
27
|
+
*/
|
|
28
|
+
export type RateLimiter_TokenBucket = {
|
|
29
|
+
tokens: bigint;
|
|
30
|
+
lastUpdated: bigint;
|
|
31
|
+
isEnabled: boolean;
|
|
32
|
+
capacity: bigint;
|
|
33
|
+
rate: bigint;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Pool.LockOrBurnInV1 struct type
|
|
38
|
+
*/
|
|
39
|
+
export type Pool_LockOrBurnInV1 = {
|
|
40
|
+
receiver: `0x${string}`;
|
|
41
|
+
remoteChainSelector: bigint;
|
|
42
|
+
originalSender: `0x${string}`;
|
|
43
|
+
amount: bigint;
|
|
44
|
+
localToken: `0x${string}`;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Pool.LockOrBurnOutV1 struct type
|
|
49
|
+
*/
|
|
50
|
+
export type Pool_LockOrBurnOutV1 = {
|
|
51
|
+
destTokenAddress: `0x${string}`;
|
|
52
|
+
destPoolData: `0x${string}`;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Pool.ReleaseOrMintInV1 struct type
|
|
57
|
+
*/
|
|
58
|
+
export type Pool_ReleaseOrMintInV1 = {
|
|
59
|
+
originalSender: `0x${string}`;
|
|
60
|
+
remoteChainSelector: bigint;
|
|
61
|
+
receiver: `0x${string}`;
|
|
62
|
+
amount: bigint;
|
|
63
|
+
localToken: `0x${string}`;
|
|
64
|
+
sourcePoolAddress: `0x${string}`;
|
|
65
|
+
sourcePoolData: `0x${string}`;
|
|
66
|
+
offchainTokenData: `0x${string}`;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Pool.ReleaseOrMintOutV1 struct type
|
|
71
|
+
*/
|
|
72
|
+
export type Pool_ReleaseOrMintOutV1 = {
|
|
73
|
+
destinationAmount: bigint;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* UpgradeableLockReleaseTokenPool ABI
|
|
77
|
+
*
|
|
78
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
79
|
+
*/
|
|
80
|
+
export const UpgradeableLockReleaseTokenPoolAbi = [
|
|
81
|
+
{
|
|
82
|
+
"inputs": [
|
|
83
|
+
{
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "token",
|
|
86
|
+
"type": "address"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"internalType": "uint8",
|
|
90
|
+
"name": "localTokenDecimals",
|
|
91
|
+
"type": "uint8"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"internalType": "address",
|
|
95
|
+
"name": "rmnProxy",
|
|
96
|
+
"type": "address"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"internalType": "bool",
|
|
100
|
+
"name": "allowListEnabled",
|
|
101
|
+
"type": "bool"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"internalType": "bool",
|
|
105
|
+
"name": "acceptLiquidity",
|
|
106
|
+
"type": "bool"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"stateMutability": "nonpayable",
|
|
110
|
+
"type": "constructor"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"inputs": [
|
|
114
|
+
{
|
|
115
|
+
"internalType": "uint256",
|
|
116
|
+
"name": "capacity",
|
|
117
|
+
"type": "uint256"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"internalType": "uint256",
|
|
121
|
+
"name": "requested",
|
|
122
|
+
"type": "uint256"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"name": "AggregateValueMaxCapacityExceeded",
|
|
126
|
+
"type": "error"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"inputs": [
|
|
130
|
+
{
|
|
131
|
+
"internalType": "uint256",
|
|
132
|
+
"name": "minWaitInSeconds",
|
|
133
|
+
"type": "uint256"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"internalType": "uint256",
|
|
137
|
+
"name": "available",
|
|
138
|
+
"type": "uint256"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"name": "AggregateValueRateLimitReached",
|
|
142
|
+
"type": "error"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"inputs": [],
|
|
146
|
+
"name": "AllowListNotEnabled",
|
|
147
|
+
"type": "error"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"inputs": [
|
|
151
|
+
{
|
|
152
|
+
"internalType": "uint256",
|
|
153
|
+
"name": "bridgeLimit",
|
|
154
|
+
"type": "uint256"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"name": "BridgeLimitExceeded",
|
|
158
|
+
"type": "error"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"inputs": [],
|
|
162
|
+
"name": "BucketOverfilled",
|
|
163
|
+
"type": "error"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"inputs": [
|
|
167
|
+
{
|
|
168
|
+
"internalType": "address",
|
|
169
|
+
"name": "caller",
|
|
170
|
+
"type": "address"
|
|
171
|
+
}
|
|
172
|
+
],
|
|
173
|
+
"name": "CallerIsNotARampOnRouter",
|
|
174
|
+
"type": "error"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [],
|
|
178
|
+
"name": "CannotTransferToSelf",
|
|
179
|
+
"type": "error"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [
|
|
183
|
+
{
|
|
184
|
+
"internalType": "uint64",
|
|
185
|
+
"name": "chainSelector",
|
|
186
|
+
"type": "uint64"
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
"name": "ChainAlreadyExists",
|
|
190
|
+
"type": "error"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"inputs": [
|
|
194
|
+
{
|
|
195
|
+
"internalType": "uint64",
|
|
196
|
+
"name": "remoteChainSelector",
|
|
197
|
+
"type": "uint64"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"name": "ChainNotAllowed",
|
|
201
|
+
"type": "error"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"inputs": [],
|
|
205
|
+
"name": "CursedByRMN",
|
|
206
|
+
"type": "error"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"inputs": [
|
|
210
|
+
{
|
|
211
|
+
"components": [
|
|
212
|
+
{
|
|
213
|
+
"internalType": "bool",
|
|
214
|
+
"name": "isEnabled",
|
|
215
|
+
"type": "bool"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "uint128",
|
|
219
|
+
"name": "capacity",
|
|
220
|
+
"type": "uint128"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"internalType": "uint128",
|
|
224
|
+
"name": "rate",
|
|
225
|
+
"type": "uint128"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"internalType": "struct RateLimiter.Config",
|
|
229
|
+
"name": "config",
|
|
230
|
+
"type": "tuple"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"name": "DisabledNonZeroRateLimit",
|
|
234
|
+
"type": "error"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"inputs": [],
|
|
238
|
+
"name": "InsufficientLiquidity",
|
|
239
|
+
"type": "error"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"inputs": [
|
|
243
|
+
{
|
|
244
|
+
"internalType": "uint8",
|
|
245
|
+
"name": "expected",
|
|
246
|
+
"type": "uint8"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"internalType": "uint8",
|
|
250
|
+
"name": "actual",
|
|
251
|
+
"type": "uint8"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"name": "InvalidDecimalArgs",
|
|
255
|
+
"type": "error"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"inputs": [
|
|
259
|
+
{
|
|
260
|
+
"components": [
|
|
261
|
+
{
|
|
262
|
+
"internalType": "bool",
|
|
263
|
+
"name": "isEnabled",
|
|
264
|
+
"type": "bool"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"internalType": "uint128",
|
|
268
|
+
"name": "capacity",
|
|
269
|
+
"type": "uint128"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"internalType": "uint128",
|
|
273
|
+
"name": "rate",
|
|
274
|
+
"type": "uint128"
|
|
275
|
+
}
|
|
276
|
+
],
|
|
277
|
+
"internalType": "struct RateLimiter.Config",
|
|
278
|
+
"name": "rateLimiterConfig",
|
|
279
|
+
"type": "tuple"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"name": "InvalidRateLimitRate",
|
|
283
|
+
"type": "error"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"inputs": [
|
|
287
|
+
{
|
|
288
|
+
"internalType": "bytes",
|
|
289
|
+
"name": "sourcePoolData",
|
|
290
|
+
"type": "bytes"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"name": "InvalidRemoteChainDecimals",
|
|
294
|
+
"type": "error"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"inputs": [
|
|
298
|
+
{
|
|
299
|
+
"internalType": "uint64",
|
|
300
|
+
"name": "remoteChainSelector",
|
|
301
|
+
"type": "uint64"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"internalType": "bytes",
|
|
305
|
+
"name": "remotePoolAddress",
|
|
306
|
+
"type": "bytes"
|
|
307
|
+
}
|
|
308
|
+
],
|
|
309
|
+
"name": "InvalidRemotePoolForChain",
|
|
310
|
+
"type": "error"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [
|
|
314
|
+
{
|
|
315
|
+
"internalType": "bytes",
|
|
316
|
+
"name": "sourcePoolAddress",
|
|
317
|
+
"type": "bytes"
|
|
318
|
+
}
|
|
319
|
+
],
|
|
320
|
+
"name": "InvalidSourcePoolAddress",
|
|
321
|
+
"type": "error"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"inputs": [
|
|
325
|
+
{
|
|
326
|
+
"internalType": "address",
|
|
327
|
+
"name": "token",
|
|
328
|
+
"type": "address"
|
|
329
|
+
}
|
|
330
|
+
],
|
|
331
|
+
"name": "InvalidToken",
|
|
332
|
+
"type": "error"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"inputs": [],
|
|
336
|
+
"name": "LiquidityNotAccepted",
|
|
337
|
+
"type": "error"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"inputs": [],
|
|
341
|
+
"name": "MustBeProposedOwner",
|
|
342
|
+
"type": "error"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"inputs": [
|
|
346
|
+
{
|
|
347
|
+
"internalType": "uint64",
|
|
348
|
+
"name": "remoteChainSelector",
|
|
349
|
+
"type": "uint64"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
"name": "NonExistentChain",
|
|
353
|
+
"type": "error"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"inputs": [],
|
|
357
|
+
"name": "NotEnoughBridgedAmount",
|
|
358
|
+
"type": "error"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"inputs": [],
|
|
362
|
+
"name": "OnlyCallableByOwner",
|
|
363
|
+
"type": "error"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"inputs": [
|
|
367
|
+
{
|
|
368
|
+
"internalType": "uint8",
|
|
369
|
+
"name": "remoteDecimals",
|
|
370
|
+
"type": "uint8"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"internalType": "uint8",
|
|
374
|
+
"name": "localDecimals",
|
|
375
|
+
"type": "uint8"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"internalType": "uint256",
|
|
379
|
+
"name": "remoteAmount",
|
|
380
|
+
"type": "uint256"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"name": "OverflowDetected",
|
|
384
|
+
"type": "error"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"inputs": [],
|
|
388
|
+
"name": "OwnerCannotBeZero",
|
|
389
|
+
"type": "error"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [
|
|
393
|
+
{
|
|
394
|
+
"internalType": "uint64",
|
|
395
|
+
"name": "remoteChainSelector",
|
|
396
|
+
"type": "uint64"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"internalType": "bytes",
|
|
400
|
+
"name": "remotePoolAddress",
|
|
401
|
+
"type": "bytes"
|
|
402
|
+
}
|
|
403
|
+
],
|
|
404
|
+
"name": "PoolAlreadyAdded",
|
|
405
|
+
"type": "error"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"inputs": [],
|
|
409
|
+
"name": "RateLimitMustBeDisabled",
|
|
410
|
+
"type": "error"
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"inputs": [
|
|
414
|
+
{
|
|
415
|
+
"internalType": "address",
|
|
416
|
+
"name": "sender",
|
|
417
|
+
"type": "address"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"name": "SenderNotAllowed",
|
|
421
|
+
"type": "error"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
"inputs": [
|
|
425
|
+
{
|
|
426
|
+
"internalType": "uint256",
|
|
427
|
+
"name": "capacity",
|
|
428
|
+
"type": "uint256"
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"internalType": "uint256",
|
|
432
|
+
"name": "requested",
|
|
433
|
+
"type": "uint256"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"internalType": "address",
|
|
437
|
+
"name": "tokenAddress",
|
|
438
|
+
"type": "address"
|
|
439
|
+
}
|
|
440
|
+
],
|
|
441
|
+
"name": "TokenMaxCapacityExceeded",
|
|
442
|
+
"type": "error"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"inputs": [
|
|
446
|
+
{
|
|
447
|
+
"internalType": "uint256",
|
|
448
|
+
"name": "minWaitInSeconds",
|
|
449
|
+
"type": "uint256"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"internalType": "uint256",
|
|
453
|
+
"name": "available",
|
|
454
|
+
"type": "uint256"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"internalType": "address",
|
|
458
|
+
"name": "tokenAddress",
|
|
459
|
+
"type": "address"
|
|
460
|
+
}
|
|
461
|
+
],
|
|
462
|
+
"name": "TokenRateLimitReached",
|
|
463
|
+
"type": "error"
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"inputs": [
|
|
467
|
+
{
|
|
468
|
+
"internalType": "address",
|
|
469
|
+
"name": "caller",
|
|
470
|
+
"type": "address"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"name": "Unauthorized",
|
|
474
|
+
"type": "error"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"inputs": [],
|
|
478
|
+
"name": "ZeroAddressNotAllowed",
|
|
479
|
+
"type": "error"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"anonymous": false,
|
|
483
|
+
"inputs": [
|
|
484
|
+
{
|
|
485
|
+
"indexed": false,
|
|
486
|
+
"internalType": "address",
|
|
487
|
+
"name": "sender",
|
|
488
|
+
"type": "address"
|
|
489
|
+
}
|
|
490
|
+
],
|
|
491
|
+
"name": "AllowListAdd",
|
|
492
|
+
"type": "event"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"anonymous": false,
|
|
496
|
+
"inputs": [
|
|
497
|
+
{
|
|
498
|
+
"indexed": false,
|
|
499
|
+
"internalType": "address",
|
|
500
|
+
"name": "sender",
|
|
501
|
+
"type": "address"
|
|
502
|
+
}
|
|
503
|
+
],
|
|
504
|
+
"name": "AllowListRemove",
|
|
505
|
+
"type": "event"
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
"anonymous": false,
|
|
509
|
+
"inputs": [
|
|
510
|
+
{
|
|
511
|
+
"indexed": true,
|
|
512
|
+
"internalType": "address",
|
|
513
|
+
"name": "oldAdmin",
|
|
514
|
+
"type": "address"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"indexed": true,
|
|
518
|
+
"internalType": "address",
|
|
519
|
+
"name": "newAdmin",
|
|
520
|
+
"type": "address"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
"name": "BridgeLimitAdminUpdated",
|
|
524
|
+
"type": "event"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
"anonymous": false,
|
|
528
|
+
"inputs": [
|
|
529
|
+
{
|
|
530
|
+
"indexed": false,
|
|
531
|
+
"internalType": "uint256",
|
|
532
|
+
"name": "oldBridgeLimit",
|
|
533
|
+
"type": "uint256"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"indexed": false,
|
|
537
|
+
"internalType": "uint256",
|
|
538
|
+
"name": "newBridgeLimit",
|
|
539
|
+
"type": "uint256"
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
"name": "BridgeLimitUpdated",
|
|
543
|
+
"type": "event"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"anonymous": false,
|
|
547
|
+
"inputs": [
|
|
548
|
+
{
|
|
549
|
+
"indexed": true,
|
|
550
|
+
"internalType": "address",
|
|
551
|
+
"name": "sender",
|
|
552
|
+
"type": "address"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"indexed": false,
|
|
556
|
+
"internalType": "uint256",
|
|
557
|
+
"name": "amount",
|
|
558
|
+
"type": "uint256"
|
|
559
|
+
}
|
|
560
|
+
],
|
|
561
|
+
"name": "Burned",
|
|
562
|
+
"type": "event"
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
"anonymous": false,
|
|
566
|
+
"inputs": [
|
|
567
|
+
{
|
|
568
|
+
"indexed": false,
|
|
569
|
+
"internalType": "uint64",
|
|
570
|
+
"name": "remoteChainSelector",
|
|
571
|
+
"type": "uint64"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"indexed": false,
|
|
575
|
+
"internalType": "bytes",
|
|
576
|
+
"name": "remoteToken",
|
|
577
|
+
"type": "bytes"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"components": [
|
|
581
|
+
{
|
|
582
|
+
"internalType": "bool",
|
|
583
|
+
"name": "isEnabled",
|
|
584
|
+
"type": "bool"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"internalType": "uint128",
|
|
588
|
+
"name": "capacity",
|
|
589
|
+
"type": "uint128"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"internalType": "uint128",
|
|
593
|
+
"name": "rate",
|
|
594
|
+
"type": "uint128"
|
|
595
|
+
}
|
|
596
|
+
],
|
|
597
|
+
"indexed": false,
|
|
598
|
+
"internalType": "struct RateLimiter.Config",
|
|
599
|
+
"name": "outboundRateLimiterConfig",
|
|
600
|
+
"type": "tuple"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"components": [
|
|
604
|
+
{
|
|
605
|
+
"internalType": "bool",
|
|
606
|
+
"name": "isEnabled",
|
|
607
|
+
"type": "bool"
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
"internalType": "uint128",
|
|
611
|
+
"name": "capacity",
|
|
612
|
+
"type": "uint128"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"internalType": "uint128",
|
|
616
|
+
"name": "rate",
|
|
617
|
+
"type": "uint128"
|
|
618
|
+
}
|
|
619
|
+
],
|
|
620
|
+
"indexed": false,
|
|
621
|
+
"internalType": "struct RateLimiter.Config",
|
|
622
|
+
"name": "inboundRateLimiterConfig",
|
|
623
|
+
"type": "tuple"
|
|
624
|
+
}
|
|
625
|
+
],
|
|
626
|
+
"name": "ChainAdded",
|
|
627
|
+
"type": "event"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"anonymous": false,
|
|
631
|
+
"inputs": [
|
|
632
|
+
{
|
|
633
|
+
"indexed": false,
|
|
634
|
+
"internalType": "uint64",
|
|
635
|
+
"name": "remoteChainSelector",
|
|
636
|
+
"type": "uint64"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"components": [
|
|
640
|
+
{
|
|
641
|
+
"internalType": "bool",
|
|
642
|
+
"name": "isEnabled",
|
|
643
|
+
"type": "bool"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"internalType": "uint128",
|
|
647
|
+
"name": "capacity",
|
|
648
|
+
"type": "uint128"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"internalType": "uint128",
|
|
652
|
+
"name": "rate",
|
|
653
|
+
"type": "uint128"
|
|
654
|
+
}
|
|
655
|
+
],
|
|
656
|
+
"indexed": false,
|
|
657
|
+
"internalType": "struct RateLimiter.Config",
|
|
658
|
+
"name": "outboundRateLimiterConfig",
|
|
659
|
+
"type": "tuple"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"components": [
|
|
663
|
+
{
|
|
664
|
+
"internalType": "bool",
|
|
665
|
+
"name": "isEnabled",
|
|
666
|
+
"type": "bool"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"internalType": "uint128",
|
|
670
|
+
"name": "capacity",
|
|
671
|
+
"type": "uint128"
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"internalType": "uint128",
|
|
675
|
+
"name": "rate",
|
|
676
|
+
"type": "uint128"
|
|
677
|
+
}
|
|
678
|
+
],
|
|
679
|
+
"indexed": false,
|
|
680
|
+
"internalType": "struct RateLimiter.Config",
|
|
681
|
+
"name": "inboundRateLimiterConfig",
|
|
682
|
+
"type": "tuple"
|
|
683
|
+
}
|
|
684
|
+
],
|
|
685
|
+
"name": "ChainConfigured",
|
|
686
|
+
"type": "event"
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"anonymous": false,
|
|
690
|
+
"inputs": [
|
|
691
|
+
{
|
|
692
|
+
"indexed": false,
|
|
693
|
+
"internalType": "uint64",
|
|
694
|
+
"name": "remoteChainSelector",
|
|
695
|
+
"type": "uint64"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
"name": "ChainRemoved",
|
|
699
|
+
"type": "event"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"anonymous": false,
|
|
703
|
+
"inputs": [
|
|
704
|
+
{
|
|
705
|
+
"components": [
|
|
706
|
+
{
|
|
707
|
+
"internalType": "bool",
|
|
708
|
+
"name": "isEnabled",
|
|
709
|
+
"type": "bool"
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"internalType": "uint128",
|
|
713
|
+
"name": "capacity",
|
|
714
|
+
"type": "uint128"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"internalType": "uint128",
|
|
718
|
+
"name": "rate",
|
|
719
|
+
"type": "uint128"
|
|
720
|
+
}
|
|
721
|
+
],
|
|
722
|
+
"indexed": false,
|
|
723
|
+
"internalType": "struct RateLimiter.Config",
|
|
724
|
+
"name": "config",
|
|
725
|
+
"type": "tuple"
|
|
726
|
+
}
|
|
727
|
+
],
|
|
728
|
+
"name": "ConfigChanged",
|
|
729
|
+
"type": "event"
|
|
730
|
+
},
|
|
731
|
+
{
|
|
732
|
+
"anonymous": false,
|
|
733
|
+
"inputs": [
|
|
734
|
+
{
|
|
735
|
+
"indexed": false,
|
|
736
|
+
"internalType": "uint8",
|
|
737
|
+
"name": "version",
|
|
738
|
+
"type": "uint8"
|
|
739
|
+
}
|
|
740
|
+
],
|
|
741
|
+
"name": "Initialized",
|
|
742
|
+
"type": "event"
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
"anonymous": false,
|
|
746
|
+
"inputs": [
|
|
747
|
+
{
|
|
748
|
+
"indexed": true,
|
|
749
|
+
"internalType": "address",
|
|
750
|
+
"name": "provider",
|
|
751
|
+
"type": "address"
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
"indexed": true,
|
|
755
|
+
"internalType": "uint256",
|
|
756
|
+
"name": "amount",
|
|
757
|
+
"type": "uint256"
|
|
758
|
+
}
|
|
759
|
+
],
|
|
760
|
+
"name": "LiquidityAdded",
|
|
761
|
+
"type": "event"
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"anonymous": false,
|
|
765
|
+
"inputs": [
|
|
766
|
+
{
|
|
767
|
+
"indexed": true,
|
|
768
|
+
"internalType": "address",
|
|
769
|
+
"name": "provider",
|
|
770
|
+
"type": "address"
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
"indexed": true,
|
|
774
|
+
"internalType": "uint256",
|
|
775
|
+
"name": "amount",
|
|
776
|
+
"type": "uint256"
|
|
777
|
+
}
|
|
778
|
+
],
|
|
779
|
+
"name": "LiquidityRemoved",
|
|
780
|
+
"type": "event"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
"anonymous": false,
|
|
784
|
+
"inputs": [
|
|
785
|
+
{
|
|
786
|
+
"indexed": true,
|
|
787
|
+
"internalType": "address",
|
|
788
|
+
"name": "from",
|
|
789
|
+
"type": "address"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"indexed": false,
|
|
793
|
+
"internalType": "uint256",
|
|
794
|
+
"name": "amount",
|
|
795
|
+
"type": "uint256"
|
|
796
|
+
}
|
|
797
|
+
],
|
|
798
|
+
"name": "LiquidityTransferred",
|
|
799
|
+
"type": "event"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"anonymous": false,
|
|
803
|
+
"inputs": [
|
|
804
|
+
{
|
|
805
|
+
"indexed": true,
|
|
806
|
+
"internalType": "address",
|
|
807
|
+
"name": "sender",
|
|
808
|
+
"type": "address"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"indexed": false,
|
|
812
|
+
"internalType": "uint256",
|
|
813
|
+
"name": "amount",
|
|
814
|
+
"type": "uint256"
|
|
815
|
+
}
|
|
816
|
+
],
|
|
817
|
+
"name": "Locked",
|
|
818
|
+
"type": "event"
|
|
819
|
+
},
|
|
820
|
+
{
|
|
821
|
+
"anonymous": false,
|
|
822
|
+
"inputs": [
|
|
823
|
+
{
|
|
824
|
+
"indexed": true,
|
|
825
|
+
"internalType": "address",
|
|
826
|
+
"name": "sender",
|
|
827
|
+
"type": "address"
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"indexed": true,
|
|
831
|
+
"internalType": "address",
|
|
832
|
+
"name": "recipient",
|
|
833
|
+
"type": "address"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"indexed": false,
|
|
837
|
+
"internalType": "uint256",
|
|
838
|
+
"name": "amount",
|
|
839
|
+
"type": "uint256"
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"name": "Minted",
|
|
843
|
+
"type": "event"
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
"anonymous": false,
|
|
847
|
+
"inputs": [
|
|
848
|
+
{
|
|
849
|
+
"indexed": true,
|
|
850
|
+
"internalType": "address",
|
|
851
|
+
"name": "from",
|
|
852
|
+
"type": "address"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"indexed": true,
|
|
856
|
+
"internalType": "address",
|
|
857
|
+
"name": "to",
|
|
858
|
+
"type": "address"
|
|
859
|
+
}
|
|
860
|
+
],
|
|
861
|
+
"name": "OwnershipTransferRequested",
|
|
862
|
+
"type": "event"
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"anonymous": false,
|
|
866
|
+
"inputs": [
|
|
867
|
+
{
|
|
868
|
+
"indexed": true,
|
|
869
|
+
"internalType": "address",
|
|
870
|
+
"name": "from",
|
|
871
|
+
"type": "address"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
"indexed": true,
|
|
875
|
+
"internalType": "address",
|
|
876
|
+
"name": "to",
|
|
877
|
+
"type": "address"
|
|
878
|
+
}
|
|
879
|
+
],
|
|
880
|
+
"name": "OwnershipTransferred",
|
|
881
|
+
"type": "event"
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"anonymous": false,
|
|
885
|
+
"inputs": [
|
|
886
|
+
{
|
|
887
|
+
"indexed": false,
|
|
888
|
+
"internalType": "address",
|
|
889
|
+
"name": "rateLimitAdmin",
|
|
890
|
+
"type": "address"
|
|
891
|
+
}
|
|
892
|
+
],
|
|
893
|
+
"name": "RateLimitAdminSet",
|
|
894
|
+
"type": "event"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"anonymous": false,
|
|
898
|
+
"inputs": [
|
|
899
|
+
{
|
|
900
|
+
"indexed": true,
|
|
901
|
+
"internalType": "address",
|
|
902
|
+
"name": "sender",
|
|
903
|
+
"type": "address"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"indexed": true,
|
|
907
|
+
"internalType": "address",
|
|
908
|
+
"name": "recipient",
|
|
909
|
+
"type": "address"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
"indexed": false,
|
|
913
|
+
"internalType": "uint256",
|
|
914
|
+
"name": "amount",
|
|
915
|
+
"type": "uint256"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
918
|
+
"name": "Released",
|
|
919
|
+
"type": "event"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"anonymous": false,
|
|
923
|
+
"inputs": [
|
|
924
|
+
{
|
|
925
|
+
"indexed": true,
|
|
926
|
+
"internalType": "uint64",
|
|
927
|
+
"name": "remoteChainSelector",
|
|
928
|
+
"type": "uint64"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"indexed": false,
|
|
932
|
+
"internalType": "bytes",
|
|
933
|
+
"name": "remotePoolAddress",
|
|
934
|
+
"type": "bytes"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
"name": "RemotePoolAdded",
|
|
938
|
+
"type": "event"
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"anonymous": false,
|
|
942
|
+
"inputs": [
|
|
943
|
+
{
|
|
944
|
+
"indexed": true,
|
|
945
|
+
"internalType": "uint64",
|
|
946
|
+
"name": "remoteChainSelector",
|
|
947
|
+
"type": "uint64"
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
"indexed": false,
|
|
951
|
+
"internalType": "bytes",
|
|
952
|
+
"name": "remotePoolAddress",
|
|
953
|
+
"type": "bytes"
|
|
954
|
+
}
|
|
955
|
+
],
|
|
956
|
+
"name": "RemotePoolRemoved",
|
|
957
|
+
"type": "event"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
"anonymous": false,
|
|
961
|
+
"inputs": [
|
|
962
|
+
{
|
|
963
|
+
"indexed": false,
|
|
964
|
+
"internalType": "address",
|
|
965
|
+
"name": "oldRouter",
|
|
966
|
+
"type": "address"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"indexed": false,
|
|
970
|
+
"internalType": "address",
|
|
971
|
+
"name": "newRouter",
|
|
972
|
+
"type": "address"
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
"name": "RouterUpdated",
|
|
976
|
+
"type": "event"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"anonymous": false,
|
|
980
|
+
"inputs": [
|
|
981
|
+
{
|
|
982
|
+
"indexed": false,
|
|
983
|
+
"internalType": "uint256",
|
|
984
|
+
"name": "tokens",
|
|
985
|
+
"type": "uint256"
|
|
986
|
+
}
|
|
987
|
+
],
|
|
988
|
+
"name": "TokensConsumed",
|
|
989
|
+
"type": "event"
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"inputs": [],
|
|
993
|
+
"name": "acceptOwnership",
|
|
994
|
+
"outputs": [],
|
|
995
|
+
"stateMutability": "nonpayable",
|
|
996
|
+
"type": "function"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"inputs": [
|
|
1000
|
+
{
|
|
1001
|
+
"internalType": "uint64",
|
|
1002
|
+
"name": "remoteChainSelector",
|
|
1003
|
+
"type": "uint64"
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"internalType": "bytes",
|
|
1007
|
+
"name": "remotePoolAddress",
|
|
1008
|
+
"type": "bytes"
|
|
1009
|
+
}
|
|
1010
|
+
],
|
|
1011
|
+
"name": "addRemotePool",
|
|
1012
|
+
"outputs": [],
|
|
1013
|
+
"stateMutability": "nonpayable",
|
|
1014
|
+
"type": "function"
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
"inputs": [
|
|
1018
|
+
{
|
|
1019
|
+
"internalType": "address[]",
|
|
1020
|
+
"name": "removes",
|
|
1021
|
+
"type": "address[]"
|
|
1022
|
+
},
|
|
1023
|
+
{
|
|
1024
|
+
"internalType": "address[]",
|
|
1025
|
+
"name": "adds",
|
|
1026
|
+
"type": "address[]"
|
|
1027
|
+
}
|
|
1028
|
+
],
|
|
1029
|
+
"name": "applyAllowListUpdates",
|
|
1030
|
+
"outputs": [],
|
|
1031
|
+
"stateMutability": "nonpayable",
|
|
1032
|
+
"type": "function"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"inputs": [
|
|
1036
|
+
{
|
|
1037
|
+
"internalType": "uint64[]",
|
|
1038
|
+
"name": "remoteChainSelectorsToRemove",
|
|
1039
|
+
"type": "uint64[]"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"components": [
|
|
1043
|
+
{
|
|
1044
|
+
"internalType": "uint64",
|
|
1045
|
+
"name": "remoteChainSelector",
|
|
1046
|
+
"type": "uint64"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
"internalType": "bytes[]",
|
|
1050
|
+
"name": "remotePoolAddresses",
|
|
1051
|
+
"type": "bytes[]"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
"internalType": "bytes",
|
|
1055
|
+
"name": "remoteTokenAddress",
|
|
1056
|
+
"type": "bytes"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"components": [
|
|
1060
|
+
{
|
|
1061
|
+
"internalType": "bool",
|
|
1062
|
+
"name": "isEnabled",
|
|
1063
|
+
"type": "bool"
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
"internalType": "uint128",
|
|
1067
|
+
"name": "capacity",
|
|
1068
|
+
"type": "uint128"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"internalType": "uint128",
|
|
1072
|
+
"name": "rate",
|
|
1073
|
+
"type": "uint128"
|
|
1074
|
+
}
|
|
1075
|
+
],
|
|
1076
|
+
"internalType": "struct RateLimiter.Config",
|
|
1077
|
+
"name": "outboundRateLimiterConfig",
|
|
1078
|
+
"type": "tuple"
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
"components": [
|
|
1082
|
+
{
|
|
1083
|
+
"internalType": "bool",
|
|
1084
|
+
"name": "isEnabled",
|
|
1085
|
+
"type": "bool"
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
"internalType": "uint128",
|
|
1089
|
+
"name": "capacity",
|
|
1090
|
+
"type": "uint128"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"internalType": "uint128",
|
|
1094
|
+
"name": "rate",
|
|
1095
|
+
"type": "uint128"
|
|
1096
|
+
}
|
|
1097
|
+
],
|
|
1098
|
+
"internalType": "struct RateLimiter.Config",
|
|
1099
|
+
"name": "inboundRateLimiterConfig",
|
|
1100
|
+
"type": "tuple"
|
|
1101
|
+
}
|
|
1102
|
+
],
|
|
1103
|
+
"internalType": "struct UpgradeableTokenPool.ChainUpdate[]",
|
|
1104
|
+
"name": "chainsToAdd",
|
|
1105
|
+
"type": "tuple[]"
|
|
1106
|
+
}
|
|
1107
|
+
],
|
|
1108
|
+
"name": "applyChainUpdates",
|
|
1109
|
+
"outputs": [],
|
|
1110
|
+
"stateMutability": "nonpayable",
|
|
1111
|
+
"type": "function"
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
"inputs": [],
|
|
1115
|
+
"name": "canAcceptLiquidity",
|
|
1116
|
+
"outputs": [
|
|
1117
|
+
{
|
|
1118
|
+
"internalType": "bool",
|
|
1119
|
+
"name": "",
|
|
1120
|
+
"type": "bool"
|
|
1121
|
+
}
|
|
1122
|
+
],
|
|
1123
|
+
"stateMutability": "view",
|
|
1124
|
+
"type": "function"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
"inputs": [],
|
|
1128
|
+
"name": "getAllowList",
|
|
1129
|
+
"outputs": [
|
|
1130
|
+
{
|
|
1131
|
+
"internalType": "address[]",
|
|
1132
|
+
"name": "",
|
|
1133
|
+
"type": "address[]"
|
|
1134
|
+
}
|
|
1135
|
+
],
|
|
1136
|
+
"stateMutability": "view",
|
|
1137
|
+
"type": "function"
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"inputs": [],
|
|
1141
|
+
"name": "getAllowListEnabled",
|
|
1142
|
+
"outputs": [
|
|
1143
|
+
{
|
|
1144
|
+
"internalType": "bool",
|
|
1145
|
+
"name": "",
|
|
1146
|
+
"type": "bool"
|
|
1147
|
+
}
|
|
1148
|
+
],
|
|
1149
|
+
"stateMutability": "view",
|
|
1150
|
+
"type": "function"
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
"inputs": [],
|
|
1154
|
+
"name": "getBridgeLimit",
|
|
1155
|
+
"outputs": [
|
|
1156
|
+
{
|
|
1157
|
+
"internalType": "uint256",
|
|
1158
|
+
"name": "",
|
|
1159
|
+
"type": "uint256"
|
|
1160
|
+
}
|
|
1161
|
+
],
|
|
1162
|
+
"stateMutability": "view",
|
|
1163
|
+
"type": "function"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"inputs": [],
|
|
1167
|
+
"name": "getBridgeLimitAdmin",
|
|
1168
|
+
"outputs": [
|
|
1169
|
+
{
|
|
1170
|
+
"internalType": "address",
|
|
1171
|
+
"name": "",
|
|
1172
|
+
"type": "address"
|
|
1173
|
+
}
|
|
1174
|
+
],
|
|
1175
|
+
"stateMutability": "view",
|
|
1176
|
+
"type": "function"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"inputs": [],
|
|
1180
|
+
"name": "getCurrentBridgedAmount",
|
|
1181
|
+
"outputs": [
|
|
1182
|
+
{
|
|
1183
|
+
"internalType": "uint256",
|
|
1184
|
+
"name": "",
|
|
1185
|
+
"type": "uint256"
|
|
1186
|
+
}
|
|
1187
|
+
],
|
|
1188
|
+
"stateMutability": "view",
|
|
1189
|
+
"type": "function"
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
"inputs": [
|
|
1193
|
+
{
|
|
1194
|
+
"internalType": "uint64",
|
|
1195
|
+
"name": "remoteChainSelector",
|
|
1196
|
+
"type": "uint64"
|
|
1197
|
+
}
|
|
1198
|
+
],
|
|
1199
|
+
"name": "getCurrentInboundRateLimiterState",
|
|
1200
|
+
"outputs": [
|
|
1201
|
+
{
|
|
1202
|
+
"components": [
|
|
1203
|
+
{
|
|
1204
|
+
"internalType": "uint128",
|
|
1205
|
+
"name": "tokens",
|
|
1206
|
+
"type": "uint128"
|
|
1207
|
+
},
|
|
1208
|
+
{
|
|
1209
|
+
"internalType": "uint32",
|
|
1210
|
+
"name": "lastUpdated",
|
|
1211
|
+
"type": "uint32"
|
|
1212
|
+
},
|
|
1213
|
+
{
|
|
1214
|
+
"internalType": "bool",
|
|
1215
|
+
"name": "isEnabled",
|
|
1216
|
+
"type": "bool"
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"internalType": "uint128",
|
|
1220
|
+
"name": "capacity",
|
|
1221
|
+
"type": "uint128"
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
"internalType": "uint128",
|
|
1225
|
+
"name": "rate",
|
|
1226
|
+
"type": "uint128"
|
|
1227
|
+
}
|
|
1228
|
+
],
|
|
1229
|
+
"internalType": "struct RateLimiter.TokenBucket",
|
|
1230
|
+
"name": "",
|
|
1231
|
+
"type": "tuple"
|
|
1232
|
+
}
|
|
1233
|
+
],
|
|
1234
|
+
"stateMutability": "view",
|
|
1235
|
+
"type": "function"
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"inputs": [
|
|
1239
|
+
{
|
|
1240
|
+
"internalType": "uint64",
|
|
1241
|
+
"name": "remoteChainSelector",
|
|
1242
|
+
"type": "uint64"
|
|
1243
|
+
}
|
|
1244
|
+
],
|
|
1245
|
+
"name": "getCurrentOutboundRateLimiterState",
|
|
1246
|
+
"outputs": [
|
|
1247
|
+
{
|
|
1248
|
+
"components": [
|
|
1249
|
+
{
|
|
1250
|
+
"internalType": "uint128",
|
|
1251
|
+
"name": "tokens",
|
|
1252
|
+
"type": "uint128"
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
"internalType": "uint32",
|
|
1256
|
+
"name": "lastUpdated",
|
|
1257
|
+
"type": "uint32"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
"internalType": "bool",
|
|
1261
|
+
"name": "isEnabled",
|
|
1262
|
+
"type": "bool"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"internalType": "uint128",
|
|
1266
|
+
"name": "capacity",
|
|
1267
|
+
"type": "uint128"
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"internalType": "uint128",
|
|
1271
|
+
"name": "rate",
|
|
1272
|
+
"type": "uint128"
|
|
1273
|
+
}
|
|
1274
|
+
],
|
|
1275
|
+
"internalType": "struct RateLimiter.TokenBucket",
|
|
1276
|
+
"name": "",
|
|
1277
|
+
"type": "tuple"
|
|
1278
|
+
}
|
|
1279
|
+
],
|
|
1280
|
+
"stateMutability": "view",
|
|
1281
|
+
"type": "function"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"inputs": [],
|
|
1285
|
+
"name": "getRateLimitAdmin",
|
|
1286
|
+
"outputs": [
|
|
1287
|
+
{
|
|
1288
|
+
"internalType": "address",
|
|
1289
|
+
"name": "",
|
|
1290
|
+
"type": "address"
|
|
1291
|
+
}
|
|
1292
|
+
],
|
|
1293
|
+
"stateMutability": "view",
|
|
1294
|
+
"type": "function"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"inputs": [],
|
|
1298
|
+
"name": "getRebalancer",
|
|
1299
|
+
"outputs": [
|
|
1300
|
+
{
|
|
1301
|
+
"internalType": "address",
|
|
1302
|
+
"name": "",
|
|
1303
|
+
"type": "address"
|
|
1304
|
+
}
|
|
1305
|
+
],
|
|
1306
|
+
"stateMutability": "view",
|
|
1307
|
+
"type": "function"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
"inputs": [
|
|
1311
|
+
{
|
|
1312
|
+
"internalType": "uint64",
|
|
1313
|
+
"name": "remoteChainSelector",
|
|
1314
|
+
"type": "uint64"
|
|
1315
|
+
}
|
|
1316
|
+
],
|
|
1317
|
+
"name": "getRemotePools",
|
|
1318
|
+
"outputs": [
|
|
1319
|
+
{
|
|
1320
|
+
"internalType": "bytes[]",
|
|
1321
|
+
"name": "",
|
|
1322
|
+
"type": "bytes[]"
|
|
1323
|
+
}
|
|
1324
|
+
],
|
|
1325
|
+
"stateMutability": "view",
|
|
1326
|
+
"type": "function"
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"inputs": [
|
|
1330
|
+
{
|
|
1331
|
+
"internalType": "uint64",
|
|
1332
|
+
"name": "remoteChainSelector",
|
|
1333
|
+
"type": "uint64"
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"name": "getRemoteToken",
|
|
1337
|
+
"outputs": [
|
|
1338
|
+
{
|
|
1339
|
+
"internalType": "bytes",
|
|
1340
|
+
"name": "",
|
|
1341
|
+
"type": "bytes"
|
|
1342
|
+
}
|
|
1343
|
+
],
|
|
1344
|
+
"stateMutability": "view",
|
|
1345
|
+
"type": "function"
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
"inputs": [],
|
|
1349
|
+
"name": "getRmnProxy",
|
|
1350
|
+
"outputs": [
|
|
1351
|
+
{
|
|
1352
|
+
"internalType": "address",
|
|
1353
|
+
"name": "rmnProxy",
|
|
1354
|
+
"type": "address"
|
|
1355
|
+
}
|
|
1356
|
+
],
|
|
1357
|
+
"stateMutability": "view",
|
|
1358
|
+
"type": "function"
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
"inputs": [],
|
|
1362
|
+
"name": "getRouter",
|
|
1363
|
+
"outputs": [
|
|
1364
|
+
{
|
|
1365
|
+
"internalType": "address",
|
|
1366
|
+
"name": "router",
|
|
1367
|
+
"type": "address"
|
|
1368
|
+
}
|
|
1369
|
+
],
|
|
1370
|
+
"stateMutability": "view",
|
|
1371
|
+
"type": "function"
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"inputs": [],
|
|
1375
|
+
"name": "getSupportedChains",
|
|
1376
|
+
"outputs": [
|
|
1377
|
+
{
|
|
1378
|
+
"internalType": "uint64[]",
|
|
1379
|
+
"name": "",
|
|
1380
|
+
"type": "uint64[]"
|
|
1381
|
+
}
|
|
1382
|
+
],
|
|
1383
|
+
"stateMutability": "view",
|
|
1384
|
+
"type": "function"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"inputs": [],
|
|
1388
|
+
"name": "getToken",
|
|
1389
|
+
"outputs": [
|
|
1390
|
+
{
|
|
1391
|
+
"internalType": "contract IERC20",
|
|
1392
|
+
"name": "token",
|
|
1393
|
+
"type": "address"
|
|
1394
|
+
}
|
|
1395
|
+
],
|
|
1396
|
+
"stateMutability": "view",
|
|
1397
|
+
"type": "function"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"inputs": [],
|
|
1401
|
+
"name": "getTokenDecimals",
|
|
1402
|
+
"outputs": [
|
|
1403
|
+
{
|
|
1404
|
+
"internalType": "uint8",
|
|
1405
|
+
"name": "decimals",
|
|
1406
|
+
"type": "uint8"
|
|
1407
|
+
}
|
|
1408
|
+
],
|
|
1409
|
+
"stateMutability": "view",
|
|
1410
|
+
"type": "function"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"inputs": [
|
|
1414
|
+
{
|
|
1415
|
+
"internalType": "address",
|
|
1416
|
+
"name": "owner_",
|
|
1417
|
+
"type": "address"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"internalType": "address[]",
|
|
1421
|
+
"name": "allowlist",
|
|
1422
|
+
"type": "address[]"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"internalType": "address",
|
|
1426
|
+
"name": "router",
|
|
1427
|
+
"type": "address"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"internalType": "uint256",
|
|
1431
|
+
"name": "bridgeLimit",
|
|
1432
|
+
"type": "uint256"
|
|
1433
|
+
}
|
|
1434
|
+
],
|
|
1435
|
+
"name": "initialize",
|
|
1436
|
+
"outputs": [],
|
|
1437
|
+
"stateMutability": "nonpayable",
|
|
1438
|
+
"type": "function"
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"inputs": [
|
|
1442
|
+
{
|
|
1443
|
+
"internalType": "uint64",
|
|
1444
|
+
"name": "remoteChainSelector",
|
|
1445
|
+
"type": "uint64"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
"internalType": "bytes",
|
|
1449
|
+
"name": "remotePoolAddress",
|
|
1450
|
+
"type": "bytes"
|
|
1451
|
+
}
|
|
1452
|
+
],
|
|
1453
|
+
"name": "isRemotePool",
|
|
1454
|
+
"outputs": [
|
|
1455
|
+
{
|
|
1456
|
+
"internalType": "bool",
|
|
1457
|
+
"name": "",
|
|
1458
|
+
"type": "bool"
|
|
1459
|
+
}
|
|
1460
|
+
],
|
|
1461
|
+
"stateMutability": "view",
|
|
1462
|
+
"type": "function"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"inputs": [
|
|
1466
|
+
{
|
|
1467
|
+
"internalType": "uint64",
|
|
1468
|
+
"name": "remoteChainSelector",
|
|
1469
|
+
"type": "uint64"
|
|
1470
|
+
}
|
|
1471
|
+
],
|
|
1472
|
+
"name": "isSupportedChain",
|
|
1473
|
+
"outputs": [
|
|
1474
|
+
{
|
|
1475
|
+
"internalType": "bool",
|
|
1476
|
+
"name": "",
|
|
1477
|
+
"type": "bool"
|
|
1478
|
+
}
|
|
1479
|
+
],
|
|
1480
|
+
"stateMutability": "view",
|
|
1481
|
+
"type": "function"
|
|
1482
|
+
},
|
|
1483
|
+
{
|
|
1484
|
+
"inputs": [
|
|
1485
|
+
{
|
|
1486
|
+
"internalType": "address",
|
|
1487
|
+
"name": "token",
|
|
1488
|
+
"type": "address"
|
|
1489
|
+
}
|
|
1490
|
+
],
|
|
1491
|
+
"name": "isSupportedToken",
|
|
1492
|
+
"outputs": [
|
|
1493
|
+
{
|
|
1494
|
+
"internalType": "bool",
|
|
1495
|
+
"name": "",
|
|
1496
|
+
"type": "bool"
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
"stateMutability": "view",
|
|
1500
|
+
"type": "function"
|
|
1501
|
+
},
|
|
1502
|
+
{
|
|
1503
|
+
"inputs": [
|
|
1504
|
+
{
|
|
1505
|
+
"components": [
|
|
1506
|
+
{
|
|
1507
|
+
"internalType": "bytes",
|
|
1508
|
+
"name": "receiver",
|
|
1509
|
+
"type": "bytes"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"internalType": "uint64",
|
|
1513
|
+
"name": "remoteChainSelector",
|
|
1514
|
+
"type": "uint64"
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
"internalType": "address",
|
|
1518
|
+
"name": "originalSender",
|
|
1519
|
+
"type": "address"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"internalType": "uint256",
|
|
1523
|
+
"name": "amount",
|
|
1524
|
+
"type": "uint256"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"internalType": "address",
|
|
1528
|
+
"name": "localToken",
|
|
1529
|
+
"type": "address"
|
|
1530
|
+
}
|
|
1531
|
+
],
|
|
1532
|
+
"internalType": "struct Pool.LockOrBurnInV1",
|
|
1533
|
+
"name": "lockOrBurnIn",
|
|
1534
|
+
"type": "tuple"
|
|
1535
|
+
}
|
|
1536
|
+
],
|
|
1537
|
+
"name": "lockOrBurn",
|
|
1538
|
+
"outputs": [
|
|
1539
|
+
{
|
|
1540
|
+
"components": [
|
|
1541
|
+
{
|
|
1542
|
+
"internalType": "bytes",
|
|
1543
|
+
"name": "destTokenAddress",
|
|
1544
|
+
"type": "bytes"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"internalType": "bytes",
|
|
1548
|
+
"name": "destPoolData",
|
|
1549
|
+
"type": "bytes"
|
|
1550
|
+
}
|
|
1551
|
+
],
|
|
1552
|
+
"internalType": "struct Pool.LockOrBurnOutV1",
|
|
1553
|
+
"name": "",
|
|
1554
|
+
"type": "tuple"
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"stateMutability": "nonpayable",
|
|
1558
|
+
"type": "function"
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"inputs": [],
|
|
1562
|
+
"name": "owner",
|
|
1563
|
+
"outputs": [
|
|
1564
|
+
{
|
|
1565
|
+
"internalType": "address",
|
|
1566
|
+
"name": "",
|
|
1567
|
+
"type": "address"
|
|
1568
|
+
}
|
|
1569
|
+
],
|
|
1570
|
+
"stateMutability": "view",
|
|
1571
|
+
"type": "function"
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
"inputs": [
|
|
1575
|
+
{
|
|
1576
|
+
"internalType": "uint256",
|
|
1577
|
+
"name": "amount",
|
|
1578
|
+
"type": "uint256"
|
|
1579
|
+
}
|
|
1580
|
+
],
|
|
1581
|
+
"name": "provideLiquidity",
|
|
1582
|
+
"outputs": [],
|
|
1583
|
+
"stateMutability": "nonpayable",
|
|
1584
|
+
"type": "function"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"inputs": [
|
|
1588
|
+
{
|
|
1589
|
+
"components": [
|
|
1590
|
+
{
|
|
1591
|
+
"internalType": "bytes",
|
|
1592
|
+
"name": "originalSender",
|
|
1593
|
+
"type": "bytes"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
"internalType": "uint64",
|
|
1597
|
+
"name": "remoteChainSelector",
|
|
1598
|
+
"type": "uint64"
|
|
1599
|
+
},
|
|
1600
|
+
{
|
|
1601
|
+
"internalType": "address",
|
|
1602
|
+
"name": "receiver",
|
|
1603
|
+
"type": "address"
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"internalType": "uint256",
|
|
1607
|
+
"name": "amount",
|
|
1608
|
+
"type": "uint256"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"internalType": "address",
|
|
1612
|
+
"name": "localToken",
|
|
1613
|
+
"type": "address"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"internalType": "bytes",
|
|
1617
|
+
"name": "sourcePoolAddress",
|
|
1618
|
+
"type": "bytes"
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"internalType": "bytes",
|
|
1622
|
+
"name": "sourcePoolData",
|
|
1623
|
+
"type": "bytes"
|
|
1624
|
+
},
|
|
1625
|
+
{
|
|
1626
|
+
"internalType": "bytes",
|
|
1627
|
+
"name": "offchainTokenData",
|
|
1628
|
+
"type": "bytes"
|
|
1629
|
+
}
|
|
1630
|
+
],
|
|
1631
|
+
"internalType": "struct Pool.ReleaseOrMintInV1",
|
|
1632
|
+
"name": "releaseOrMintIn",
|
|
1633
|
+
"type": "tuple"
|
|
1634
|
+
}
|
|
1635
|
+
],
|
|
1636
|
+
"name": "releaseOrMint",
|
|
1637
|
+
"outputs": [
|
|
1638
|
+
{
|
|
1639
|
+
"components": [
|
|
1640
|
+
{
|
|
1641
|
+
"internalType": "uint256",
|
|
1642
|
+
"name": "destinationAmount",
|
|
1643
|
+
"type": "uint256"
|
|
1644
|
+
}
|
|
1645
|
+
],
|
|
1646
|
+
"internalType": "struct Pool.ReleaseOrMintOutV1",
|
|
1647
|
+
"name": "",
|
|
1648
|
+
"type": "tuple"
|
|
1649
|
+
}
|
|
1650
|
+
],
|
|
1651
|
+
"stateMutability": "nonpayable",
|
|
1652
|
+
"type": "function"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"inputs": [
|
|
1656
|
+
{
|
|
1657
|
+
"internalType": "uint64",
|
|
1658
|
+
"name": "remoteChainSelector",
|
|
1659
|
+
"type": "uint64"
|
|
1660
|
+
},
|
|
1661
|
+
{
|
|
1662
|
+
"internalType": "bytes",
|
|
1663
|
+
"name": "remotePoolAddress",
|
|
1664
|
+
"type": "bytes"
|
|
1665
|
+
}
|
|
1666
|
+
],
|
|
1667
|
+
"name": "removeRemotePool",
|
|
1668
|
+
"outputs": [],
|
|
1669
|
+
"stateMutability": "nonpayable",
|
|
1670
|
+
"type": "function"
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"inputs": [
|
|
1674
|
+
{
|
|
1675
|
+
"internalType": "uint256",
|
|
1676
|
+
"name": "newBridgeLimit",
|
|
1677
|
+
"type": "uint256"
|
|
1678
|
+
}
|
|
1679
|
+
],
|
|
1680
|
+
"name": "setBridgeLimit",
|
|
1681
|
+
"outputs": [],
|
|
1682
|
+
"stateMutability": "nonpayable",
|
|
1683
|
+
"type": "function"
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
"inputs": [
|
|
1687
|
+
{
|
|
1688
|
+
"internalType": "address",
|
|
1689
|
+
"name": "bridgeLimitAdmin",
|
|
1690
|
+
"type": "address"
|
|
1691
|
+
}
|
|
1692
|
+
],
|
|
1693
|
+
"name": "setBridgeLimitAdmin",
|
|
1694
|
+
"outputs": [],
|
|
1695
|
+
"stateMutability": "nonpayable",
|
|
1696
|
+
"type": "function"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"inputs": [
|
|
1700
|
+
{
|
|
1701
|
+
"internalType": "uint64",
|
|
1702
|
+
"name": "remoteChainSelector",
|
|
1703
|
+
"type": "uint64"
|
|
1704
|
+
},
|
|
1705
|
+
{
|
|
1706
|
+
"components": [
|
|
1707
|
+
{
|
|
1708
|
+
"internalType": "bool",
|
|
1709
|
+
"name": "isEnabled",
|
|
1710
|
+
"type": "bool"
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
"internalType": "uint128",
|
|
1714
|
+
"name": "capacity",
|
|
1715
|
+
"type": "uint128"
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"internalType": "uint128",
|
|
1719
|
+
"name": "rate",
|
|
1720
|
+
"type": "uint128"
|
|
1721
|
+
}
|
|
1722
|
+
],
|
|
1723
|
+
"internalType": "struct RateLimiter.Config",
|
|
1724
|
+
"name": "outboundConfig",
|
|
1725
|
+
"type": "tuple"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"components": [
|
|
1729
|
+
{
|
|
1730
|
+
"internalType": "bool",
|
|
1731
|
+
"name": "isEnabled",
|
|
1732
|
+
"type": "bool"
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
"internalType": "uint128",
|
|
1736
|
+
"name": "capacity",
|
|
1737
|
+
"type": "uint128"
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
"internalType": "uint128",
|
|
1741
|
+
"name": "rate",
|
|
1742
|
+
"type": "uint128"
|
|
1743
|
+
}
|
|
1744
|
+
],
|
|
1745
|
+
"internalType": "struct RateLimiter.Config",
|
|
1746
|
+
"name": "inboundConfig",
|
|
1747
|
+
"type": "tuple"
|
|
1748
|
+
}
|
|
1749
|
+
],
|
|
1750
|
+
"name": "setChainRateLimiterConfig",
|
|
1751
|
+
"outputs": [],
|
|
1752
|
+
"stateMutability": "nonpayable",
|
|
1753
|
+
"type": "function"
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
"inputs": [
|
|
1757
|
+
{
|
|
1758
|
+
"internalType": "uint256",
|
|
1759
|
+
"name": "newCurrentBridged",
|
|
1760
|
+
"type": "uint256"
|
|
1761
|
+
}
|
|
1762
|
+
],
|
|
1763
|
+
"name": "setCurrentBridgedAmount",
|
|
1764
|
+
"outputs": [],
|
|
1765
|
+
"stateMutability": "nonpayable",
|
|
1766
|
+
"type": "function"
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
"inputs": [
|
|
1770
|
+
{
|
|
1771
|
+
"internalType": "address",
|
|
1772
|
+
"name": "rateLimitAdmin",
|
|
1773
|
+
"type": "address"
|
|
1774
|
+
}
|
|
1775
|
+
],
|
|
1776
|
+
"name": "setRateLimitAdmin",
|
|
1777
|
+
"outputs": [],
|
|
1778
|
+
"stateMutability": "nonpayable",
|
|
1779
|
+
"type": "function"
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"inputs": [
|
|
1783
|
+
{
|
|
1784
|
+
"internalType": "address",
|
|
1785
|
+
"name": "rebalancer",
|
|
1786
|
+
"type": "address"
|
|
1787
|
+
}
|
|
1788
|
+
],
|
|
1789
|
+
"name": "setRebalancer",
|
|
1790
|
+
"outputs": [],
|
|
1791
|
+
"stateMutability": "nonpayable",
|
|
1792
|
+
"type": "function"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"inputs": [
|
|
1796
|
+
{
|
|
1797
|
+
"internalType": "address",
|
|
1798
|
+
"name": "newRouter",
|
|
1799
|
+
"type": "address"
|
|
1800
|
+
}
|
|
1801
|
+
],
|
|
1802
|
+
"name": "setRouter",
|
|
1803
|
+
"outputs": [],
|
|
1804
|
+
"stateMutability": "nonpayable",
|
|
1805
|
+
"type": "function"
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
"inputs": [
|
|
1809
|
+
{
|
|
1810
|
+
"internalType": "bytes4",
|
|
1811
|
+
"name": "interfaceId",
|
|
1812
|
+
"type": "bytes4"
|
|
1813
|
+
}
|
|
1814
|
+
],
|
|
1815
|
+
"name": "supportsInterface",
|
|
1816
|
+
"outputs": [
|
|
1817
|
+
{
|
|
1818
|
+
"internalType": "bool",
|
|
1819
|
+
"name": "",
|
|
1820
|
+
"type": "bool"
|
|
1821
|
+
}
|
|
1822
|
+
],
|
|
1823
|
+
"stateMutability": "pure",
|
|
1824
|
+
"type": "function"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"inputs": [
|
|
1828
|
+
{
|
|
1829
|
+
"internalType": "address",
|
|
1830
|
+
"name": "from",
|
|
1831
|
+
"type": "address"
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"internalType": "uint256",
|
|
1835
|
+
"name": "amount",
|
|
1836
|
+
"type": "uint256"
|
|
1837
|
+
}
|
|
1838
|
+
],
|
|
1839
|
+
"name": "transferLiquidity",
|
|
1840
|
+
"outputs": [],
|
|
1841
|
+
"stateMutability": "nonpayable",
|
|
1842
|
+
"type": "function"
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
"inputs": [
|
|
1846
|
+
{
|
|
1847
|
+
"internalType": "address",
|
|
1848
|
+
"name": "to",
|
|
1849
|
+
"type": "address"
|
|
1850
|
+
}
|
|
1851
|
+
],
|
|
1852
|
+
"name": "transferOwnership",
|
|
1853
|
+
"outputs": [],
|
|
1854
|
+
"stateMutability": "nonpayable",
|
|
1855
|
+
"type": "function"
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
"inputs": [],
|
|
1859
|
+
"name": "typeAndVersion",
|
|
1860
|
+
"outputs": [
|
|
1861
|
+
{
|
|
1862
|
+
"internalType": "string",
|
|
1863
|
+
"name": "",
|
|
1864
|
+
"type": "string"
|
|
1865
|
+
}
|
|
1866
|
+
],
|
|
1867
|
+
"stateMutability": "view",
|
|
1868
|
+
"type": "function"
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"inputs": [
|
|
1872
|
+
{
|
|
1873
|
+
"internalType": "uint256",
|
|
1874
|
+
"name": "amount",
|
|
1875
|
+
"type": "uint256"
|
|
1876
|
+
}
|
|
1877
|
+
],
|
|
1878
|
+
"name": "withdrawLiquidity",
|
|
1879
|
+
"outputs": [],
|
|
1880
|
+
"stateMutability": "nonpayable",
|
|
1881
|
+
"type": "function"
|
|
1882
|
+
}
|
|
1883
|
+
] as const satisfies Abi;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Type-safe ABI for UpgradeableLockReleaseTokenPool
|
|
1887
|
+
*/
|
|
1888
|
+
export type UpgradeableLockReleaseTokenPoolAbi = typeof UpgradeableLockReleaseTokenPoolAbi;
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* Contract instance type for UpgradeableLockReleaseTokenPool
|
|
1892
|
+
*/
|
|
1893
|
+
// Use any for contract type to avoid complex viem type issues
|
|
1894
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
1895
|
+
export type UpgradeableLockReleaseTokenPoolContract = any;
|
|
1896
|
+
|
|
1897
|
+
/**
|
|
1898
|
+
* UpgradeableLockReleaseTokenPool Contract Class
|
|
1899
|
+
*
|
|
1900
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
1901
|
+
*
|
|
1902
|
+
* @example
|
|
1903
|
+
* ```typescript
|
|
1904
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
1905
|
+
* import { mainnet } from 'viem/chains';
|
|
1906
|
+
* import { UpgradeableLockReleaseTokenPool } from 'UpgradeableLockReleaseTokenPool';
|
|
1907
|
+
*
|
|
1908
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
1909
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
1910
|
+
*
|
|
1911
|
+
* const contract = new UpgradeableLockReleaseTokenPool('0x...', { publicClient, walletClient });
|
|
1912
|
+
*
|
|
1913
|
+
* // Read functions
|
|
1914
|
+
* const result = await contract.balanceOf('0x...');
|
|
1915
|
+
*
|
|
1916
|
+
* // Write functions
|
|
1917
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
1918
|
+
*
|
|
1919
|
+
* // Simulate transactions (dry-run)
|
|
1920
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
1921
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
1922
|
+
*
|
|
1923
|
+
* // Watch events
|
|
1924
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1925
|
+
* console.log('Transfer event:', event);
|
|
1926
|
+
* });
|
|
1927
|
+
* ```
|
|
1928
|
+
*/
|
|
1929
|
+
export class UpgradeableLockReleaseTokenPool {
|
|
1930
|
+
private contract: UpgradeableLockReleaseTokenPoolContract;
|
|
1931
|
+
private contractAddress: Address;
|
|
1932
|
+
private publicClient: PublicClient;
|
|
1933
|
+
|
|
1934
|
+
constructor(
|
|
1935
|
+
address: Address,
|
|
1936
|
+
clients: {
|
|
1937
|
+
publicClient: PublicClient;
|
|
1938
|
+
walletClient?: WalletClient;
|
|
1939
|
+
}
|
|
1940
|
+
) {
|
|
1941
|
+
this.contractAddress = address;
|
|
1942
|
+
this.publicClient = clients.publicClient;
|
|
1943
|
+
this.contract = getContract({
|
|
1944
|
+
address,
|
|
1945
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
1946
|
+
client: {
|
|
1947
|
+
public: clients.publicClient,
|
|
1948
|
+
wallet: clients.walletClient,
|
|
1949
|
+
},
|
|
1950
|
+
});
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* Get the contract address
|
|
1955
|
+
*/
|
|
1956
|
+
get address(): Address {
|
|
1957
|
+
return this.contractAddress;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
/**
|
|
1961
|
+
* Get the underlying viem contract instance.
|
|
1962
|
+
*/
|
|
1963
|
+
getContract(): UpgradeableLockReleaseTokenPoolContract {
|
|
1964
|
+
return this.contract;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* canAcceptLiquidity
|
|
1969
|
+
* view
|
|
1970
|
+
*/
|
|
1971
|
+
async canAcceptLiquidity(): Promise<boolean> {
|
|
1972
|
+
return this.contract.read.canAcceptLiquidity() as Promise<boolean>;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* getAllowList
|
|
1977
|
+
* view
|
|
1978
|
+
*/
|
|
1979
|
+
async getAllowList(): Promise<`0x${string}`[]> {
|
|
1980
|
+
return this.contract.read.getAllowList() as Promise<`0x${string}`[]>;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/**
|
|
1984
|
+
* getAllowListEnabled
|
|
1985
|
+
* view
|
|
1986
|
+
*/
|
|
1987
|
+
async getAllowListEnabled(): Promise<boolean> {
|
|
1988
|
+
return this.contract.read.getAllowListEnabled() as Promise<boolean>;
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* getBridgeLimit
|
|
1993
|
+
* view
|
|
1994
|
+
*/
|
|
1995
|
+
async getBridgeLimit(): Promise<bigint> {
|
|
1996
|
+
return this.contract.read.getBridgeLimit() as Promise<bigint>;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
/**
|
|
2000
|
+
* getBridgeLimitAdmin
|
|
2001
|
+
* view
|
|
2002
|
+
*/
|
|
2003
|
+
async getBridgeLimitAdmin(): Promise<`0x${string}`> {
|
|
2004
|
+
return this.contract.read.getBridgeLimitAdmin() as Promise<`0x${string}`>;
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
/**
|
|
2008
|
+
* getCurrentBridgedAmount
|
|
2009
|
+
* view
|
|
2010
|
+
*/
|
|
2011
|
+
async getCurrentBridgedAmount(): Promise<bigint> {
|
|
2012
|
+
return this.contract.read.getCurrentBridgedAmount() as Promise<bigint>;
|
|
2013
|
+
}
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* getCurrentInboundRateLimiterState
|
|
2017
|
+
* view
|
|
2018
|
+
*/
|
|
2019
|
+
async getCurrentInboundRateLimiterState(remoteChainSelector: bigint): Promise<RateLimiter_TokenBucket> {
|
|
2020
|
+
return this.contract.read.getCurrentInboundRateLimiterState([remoteChainSelector] as const) as Promise<RateLimiter_TokenBucket>;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
/**
|
|
2024
|
+
* getCurrentOutboundRateLimiterState
|
|
2025
|
+
* view
|
|
2026
|
+
*/
|
|
2027
|
+
async getCurrentOutboundRateLimiterState(remoteChainSelector: bigint): Promise<RateLimiter_TokenBucket> {
|
|
2028
|
+
return this.contract.read.getCurrentOutboundRateLimiterState([remoteChainSelector] as const) as Promise<RateLimiter_TokenBucket>;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
/**
|
|
2032
|
+
* getRateLimitAdmin
|
|
2033
|
+
* view
|
|
2034
|
+
*/
|
|
2035
|
+
async getRateLimitAdmin(): Promise<`0x${string}`> {
|
|
2036
|
+
return this.contract.read.getRateLimitAdmin() as Promise<`0x${string}`>;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
/**
|
|
2040
|
+
* getRebalancer
|
|
2041
|
+
* view
|
|
2042
|
+
*/
|
|
2043
|
+
async getRebalancer(): Promise<`0x${string}`> {
|
|
2044
|
+
return this.contract.read.getRebalancer() as Promise<`0x${string}`>;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
/**
|
|
2048
|
+
* getRemotePools
|
|
2049
|
+
* view
|
|
2050
|
+
*/
|
|
2051
|
+
async getRemotePools(remoteChainSelector: bigint): Promise<`0x${string}`[]> {
|
|
2052
|
+
return this.contract.read.getRemotePools([remoteChainSelector] as const) as Promise<`0x${string}`[]>;
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
/**
|
|
2056
|
+
* getRemoteToken
|
|
2057
|
+
* view
|
|
2058
|
+
*/
|
|
2059
|
+
async getRemoteToken(remoteChainSelector: bigint): Promise<`0x${string}`> {
|
|
2060
|
+
return this.contract.read.getRemoteToken([remoteChainSelector] as const) as Promise<`0x${string}`>;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
/**
|
|
2064
|
+
* getRmnProxy
|
|
2065
|
+
* view
|
|
2066
|
+
*/
|
|
2067
|
+
async getRmnProxy(): Promise<`0x${string}`> {
|
|
2068
|
+
return this.contract.read.getRmnProxy() as Promise<`0x${string}`>;
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* getRouter
|
|
2073
|
+
* view
|
|
2074
|
+
*/
|
|
2075
|
+
async getRouter(): Promise<`0x${string}`> {
|
|
2076
|
+
return this.contract.read.getRouter() as Promise<`0x${string}`>;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
/**
|
|
2080
|
+
* getSupportedChains
|
|
2081
|
+
* view
|
|
2082
|
+
*/
|
|
2083
|
+
async getSupportedChains(): Promise<bigint[]> {
|
|
2084
|
+
return this.contract.read.getSupportedChains() as Promise<bigint[]>;
|
|
2085
|
+
}
|
|
2086
|
+
|
|
2087
|
+
/**
|
|
2088
|
+
* getToken
|
|
2089
|
+
* view
|
|
2090
|
+
*/
|
|
2091
|
+
async getToken(): Promise<`0x${string}`> {
|
|
2092
|
+
return this.contract.read.getToken() as Promise<`0x${string}`>;
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/**
|
|
2096
|
+
* getTokenDecimals
|
|
2097
|
+
* view
|
|
2098
|
+
*/
|
|
2099
|
+
async getTokenDecimals(): Promise<bigint> {
|
|
2100
|
+
return this.contract.read.getTokenDecimals() as Promise<bigint>;
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
/**
|
|
2104
|
+
* isRemotePool
|
|
2105
|
+
* view
|
|
2106
|
+
*/
|
|
2107
|
+
async isRemotePool(remoteChainSelector: bigint, remotePoolAddress: `0x${string}`): Promise<boolean> {
|
|
2108
|
+
return this.contract.read.isRemotePool([remoteChainSelector, remotePoolAddress] as const) as Promise<boolean>;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
/**
|
|
2112
|
+
* isSupportedChain
|
|
2113
|
+
* view
|
|
2114
|
+
*/
|
|
2115
|
+
async isSupportedChain(remoteChainSelector: bigint): Promise<boolean> {
|
|
2116
|
+
return this.contract.read.isSupportedChain([remoteChainSelector] as const) as Promise<boolean>;
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* isSupportedToken
|
|
2121
|
+
* view
|
|
2122
|
+
*/
|
|
2123
|
+
async isSupportedToken(token: `0x${string}`): Promise<boolean> {
|
|
2124
|
+
return this.contract.read.isSupportedToken([token] as const) as Promise<boolean>;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* owner
|
|
2129
|
+
* view
|
|
2130
|
+
*/
|
|
2131
|
+
async owner(): Promise<`0x${string}`> {
|
|
2132
|
+
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
/**
|
|
2136
|
+
* supportsInterface
|
|
2137
|
+
* pure
|
|
2138
|
+
*/
|
|
2139
|
+
async supportsInterface(interfaceId: `0x${string}`): Promise<boolean> {
|
|
2140
|
+
return this.contract.read.supportsInterface([interfaceId] as const) as Promise<boolean>;
|
|
2141
|
+
}
|
|
2142
|
+
|
|
2143
|
+
/**
|
|
2144
|
+
* typeAndVersion
|
|
2145
|
+
* view
|
|
2146
|
+
*/
|
|
2147
|
+
async typeAndVersion(): Promise<string> {
|
|
2148
|
+
return this.contract.read.typeAndVersion() as Promise<string>;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/**
|
|
2152
|
+
* acceptOwnership
|
|
2153
|
+
* nonpayable
|
|
2154
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2155
|
+
*/
|
|
2156
|
+
async acceptOwnership(options?: {
|
|
2157
|
+
accessList?: import('viem').AccessList;
|
|
2158
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2159
|
+
chain?: import('viem').Chain | null;
|
|
2160
|
+
dataSuffix?: `0x${string}`;
|
|
2161
|
+
gas?: bigint;
|
|
2162
|
+
gasPrice?: bigint;
|
|
2163
|
+
maxFeePerGas?: bigint;
|
|
2164
|
+
maxPriorityFeePerGas?: bigint;
|
|
2165
|
+
nonce?: number;
|
|
2166
|
+
value?: bigint;
|
|
2167
|
+
}): Promise<`0x${string}`> {
|
|
2168
|
+
if (!this.contract.write) {
|
|
2169
|
+
throw new Error('Wallet client is required for write operations');
|
|
2170
|
+
}
|
|
2171
|
+
return this.contract.write.acceptOwnership(options) as Promise<`0x${string}`>;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
/**
|
|
2175
|
+
* addRemotePool
|
|
2176
|
+
* nonpayable
|
|
2177
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2178
|
+
*/
|
|
2179
|
+
async addRemotePool(remoteChainSelector: bigint, remotePoolAddress: `0x${string}`, options?: {
|
|
2180
|
+
accessList?: import('viem').AccessList;
|
|
2181
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2182
|
+
chain?: import('viem').Chain | null;
|
|
2183
|
+
dataSuffix?: `0x${string}`;
|
|
2184
|
+
gas?: bigint;
|
|
2185
|
+
gasPrice?: bigint;
|
|
2186
|
+
maxFeePerGas?: bigint;
|
|
2187
|
+
maxPriorityFeePerGas?: bigint;
|
|
2188
|
+
nonce?: number;
|
|
2189
|
+
value?: bigint;
|
|
2190
|
+
}): Promise<`0x${string}`> {
|
|
2191
|
+
if (!this.contract.write) {
|
|
2192
|
+
throw new Error('Wallet client is required for write operations');
|
|
2193
|
+
}
|
|
2194
|
+
return this.contract.write.addRemotePool([remoteChainSelector, remotePoolAddress] as const, options) as Promise<`0x${string}`>;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* applyAllowListUpdates
|
|
2199
|
+
* nonpayable
|
|
2200
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2201
|
+
*/
|
|
2202
|
+
async applyAllowListUpdates(removes: `0x${string}`[], adds: `0x${string}`[], options?: {
|
|
2203
|
+
accessList?: import('viem').AccessList;
|
|
2204
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2205
|
+
chain?: import('viem').Chain | null;
|
|
2206
|
+
dataSuffix?: `0x${string}`;
|
|
2207
|
+
gas?: bigint;
|
|
2208
|
+
gasPrice?: bigint;
|
|
2209
|
+
maxFeePerGas?: bigint;
|
|
2210
|
+
maxPriorityFeePerGas?: bigint;
|
|
2211
|
+
nonce?: number;
|
|
2212
|
+
value?: bigint;
|
|
2213
|
+
}): Promise<`0x${string}`> {
|
|
2214
|
+
if (!this.contract.write) {
|
|
2215
|
+
throw new Error('Wallet client is required for write operations');
|
|
2216
|
+
}
|
|
2217
|
+
return this.contract.write.applyAllowListUpdates([removes, adds] as const, options) as Promise<`0x${string}`>;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
/**
|
|
2221
|
+
* applyChainUpdates
|
|
2222
|
+
* nonpayable
|
|
2223
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2224
|
+
*/
|
|
2225
|
+
async applyChainUpdates(remoteChainSelectorsToRemove: bigint[], chainsToAdd: UpgradeableTokenPool_ChainUpdate[], options?: {
|
|
2226
|
+
accessList?: import('viem').AccessList;
|
|
2227
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2228
|
+
chain?: import('viem').Chain | null;
|
|
2229
|
+
dataSuffix?: `0x${string}`;
|
|
2230
|
+
gas?: bigint;
|
|
2231
|
+
gasPrice?: bigint;
|
|
2232
|
+
maxFeePerGas?: bigint;
|
|
2233
|
+
maxPriorityFeePerGas?: bigint;
|
|
2234
|
+
nonce?: number;
|
|
2235
|
+
value?: bigint;
|
|
2236
|
+
}): Promise<`0x${string}`> {
|
|
2237
|
+
if (!this.contract.write) {
|
|
2238
|
+
throw new Error('Wallet client is required for write operations');
|
|
2239
|
+
}
|
|
2240
|
+
return this.contract.write.applyChainUpdates([remoteChainSelectorsToRemove, chainsToAdd] as const, options) as Promise<`0x${string}`>;
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* initialize
|
|
2245
|
+
* nonpayable
|
|
2246
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2247
|
+
*/
|
|
2248
|
+
async initialize(owner_: `0x${string}`, allowlist: `0x${string}`[], router: `0x${string}`, bridgeLimit: bigint, options?: {
|
|
2249
|
+
accessList?: import('viem').AccessList;
|
|
2250
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2251
|
+
chain?: import('viem').Chain | null;
|
|
2252
|
+
dataSuffix?: `0x${string}`;
|
|
2253
|
+
gas?: bigint;
|
|
2254
|
+
gasPrice?: bigint;
|
|
2255
|
+
maxFeePerGas?: bigint;
|
|
2256
|
+
maxPriorityFeePerGas?: bigint;
|
|
2257
|
+
nonce?: number;
|
|
2258
|
+
value?: bigint;
|
|
2259
|
+
}): Promise<`0x${string}`> {
|
|
2260
|
+
if (!this.contract.write) {
|
|
2261
|
+
throw new Error('Wallet client is required for write operations');
|
|
2262
|
+
}
|
|
2263
|
+
return this.contract.write.initialize([owner_, allowlist, router, bridgeLimit] as const, options) as Promise<`0x${string}`>;
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
/**
|
|
2267
|
+
* lockOrBurn
|
|
2268
|
+
* nonpayable
|
|
2269
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2270
|
+
*/
|
|
2271
|
+
async lockOrBurn(lockOrBurnIn: Pool_LockOrBurnInV1, options?: {
|
|
2272
|
+
accessList?: import('viem').AccessList;
|
|
2273
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2274
|
+
chain?: import('viem').Chain | null;
|
|
2275
|
+
dataSuffix?: `0x${string}`;
|
|
2276
|
+
gas?: bigint;
|
|
2277
|
+
gasPrice?: bigint;
|
|
2278
|
+
maxFeePerGas?: bigint;
|
|
2279
|
+
maxPriorityFeePerGas?: bigint;
|
|
2280
|
+
nonce?: number;
|
|
2281
|
+
value?: bigint;
|
|
2282
|
+
}): Promise<`0x${string}`> {
|
|
2283
|
+
if (!this.contract.write) {
|
|
2284
|
+
throw new Error('Wallet client is required for write operations');
|
|
2285
|
+
}
|
|
2286
|
+
return this.contract.write.lockOrBurn([lockOrBurnIn] as const, options) as Promise<`0x${string}`>;
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* provideLiquidity
|
|
2291
|
+
* nonpayable
|
|
2292
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2293
|
+
*/
|
|
2294
|
+
async provideLiquidity(amount: bigint, options?: {
|
|
2295
|
+
accessList?: import('viem').AccessList;
|
|
2296
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2297
|
+
chain?: import('viem').Chain | null;
|
|
2298
|
+
dataSuffix?: `0x${string}`;
|
|
2299
|
+
gas?: bigint;
|
|
2300
|
+
gasPrice?: bigint;
|
|
2301
|
+
maxFeePerGas?: bigint;
|
|
2302
|
+
maxPriorityFeePerGas?: bigint;
|
|
2303
|
+
nonce?: number;
|
|
2304
|
+
value?: bigint;
|
|
2305
|
+
}): Promise<`0x${string}`> {
|
|
2306
|
+
if (!this.contract.write) {
|
|
2307
|
+
throw new Error('Wallet client is required for write operations');
|
|
2308
|
+
}
|
|
2309
|
+
return this.contract.write.provideLiquidity([amount] as const, options) as Promise<`0x${string}`>;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
/**
|
|
2313
|
+
* releaseOrMint
|
|
2314
|
+
* nonpayable
|
|
2315
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2316
|
+
*/
|
|
2317
|
+
async releaseOrMint(releaseOrMintIn: Pool_ReleaseOrMintInV1, options?: {
|
|
2318
|
+
accessList?: import('viem').AccessList;
|
|
2319
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2320
|
+
chain?: import('viem').Chain | null;
|
|
2321
|
+
dataSuffix?: `0x${string}`;
|
|
2322
|
+
gas?: bigint;
|
|
2323
|
+
gasPrice?: bigint;
|
|
2324
|
+
maxFeePerGas?: bigint;
|
|
2325
|
+
maxPriorityFeePerGas?: bigint;
|
|
2326
|
+
nonce?: number;
|
|
2327
|
+
value?: bigint;
|
|
2328
|
+
}): Promise<`0x${string}`> {
|
|
2329
|
+
if (!this.contract.write) {
|
|
2330
|
+
throw new Error('Wallet client is required for write operations');
|
|
2331
|
+
}
|
|
2332
|
+
return this.contract.write.releaseOrMint([releaseOrMintIn] as const, options) as Promise<`0x${string}`>;
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
/**
|
|
2336
|
+
* removeRemotePool
|
|
2337
|
+
* nonpayable
|
|
2338
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2339
|
+
*/
|
|
2340
|
+
async removeRemotePool(remoteChainSelector: bigint, remotePoolAddress: `0x${string}`, options?: {
|
|
2341
|
+
accessList?: import('viem').AccessList;
|
|
2342
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2343
|
+
chain?: import('viem').Chain | null;
|
|
2344
|
+
dataSuffix?: `0x${string}`;
|
|
2345
|
+
gas?: bigint;
|
|
2346
|
+
gasPrice?: bigint;
|
|
2347
|
+
maxFeePerGas?: bigint;
|
|
2348
|
+
maxPriorityFeePerGas?: bigint;
|
|
2349
|
+
nonce?: number;
|
|
2350
|
+
value?: bigint;
|
|
2351
|
+
}): Promise<`0x${string}`> {
|
|
2352
|
+
if (!this.contract.write) {
|
|
2353
|
+
throw new Error('Wallet client is required for write operations');
|
|
2354
|
+
}
|
|
2355
|
+
return this.contract.write.removeRemotePool([remoteChainSelector, remotePoolAddress] as const, options) as Promise<`0x${string}`>;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* setBridgeLimit
|
|
2360
|
+
* nonpayable
|
|
2361
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2362
|
+
*/
|
|
2363
|
+
async setBridgeLimit(newBridgeLimit: bigint, options?: {
|
|
2364
|
+
accessList?: import('viem').AccessList;
|
|
2365
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2366
|
+
chain?: import('viem').Chain | null;
|
|
2367
|
+
dataSuffix?: `0x${string}`;
|
|
2368
|
+
gas?: bigint;
|
|
2369
|
+
gasPrice?: bigint;
|
|
2370
|
+
maxFeePerGas?: bigint;
|
|
2371
|
+
maxPriorityFeePerGas?: bigint;
|
|
2372
|
+
nonce?: number;
|
|
2373
|
+
value?: bigint;
|
|
2374
|
+
}): Promise<`0x${string}`> {
|
|
2375
|
+
if (!this.contract.write) {
|
|
2376
|
+
throw new Error('Wallet client is required for write operations');
|
|
2377
|
+
}
|
|
2378
|
+
return this.contract.write.setBridgeLimit([newBridgeLimit] as const, options) as Promise<`0x${string}`>;
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
/**
|
|
2382
|
+
* setBridgeLimitAdmin
|
|
2383
|
+
* nonpayable
|
|
2384
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2385
|
+
*/
|
|
2386
|
+
async setBridgeLimitAdmin(bridgeLimitAdmin: `0x${string}`, options?: {
|
|
2387
|
+
accessList?: import('viem').AccessList;
|
|
2388
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2389
|
+
chain?: import('viem').Chain | null;
|
|
2390
|
+
dataSuffix?: `0x${string}`;
|
|
2391
|
+
gas?: bigint;
|
|
2392
|
+
gasPrice?: bigint;
|
|
2393
|
+
maxFeePerGas?: bigint;
|
|
2394
|
+
maxPriorityFeePerGas?: bigint;
|
|
2395
|
+
nonce?: number;
|
|
2396
|
+
value?: bigint;
|
|
2397
|
+
}): Promise<`0x${string}`> {
|
|
2398
|
+
if (!this.contract.write) {
|
|
2399
|
+
throw new Error('Wallet client is required for write operations');
|
|
2400
|
+
}
|
|
2401
|
+
return this.contract.write.setBridgeLimitAdmin([bridgeLimitAdmin] as const, options) as Promise<`0x${string}`>;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* setChainRateLimiterConfig
|
|
2406
|
+
* nonpayable
|
|
2407
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2408
|
+
*/
|
|
2409
|
+
async setChainRateLimiterConfig(remoteChainSelector: bigint, outboundConfig: RateLimiter_Config, inboundConfig: RateLimiter_Config, options?: {
|
|
2410
|
+
accessList?: import('viem').AccessList;
|
|
2411
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2412
|
+
chain?: import('viem').Chain | null;
|
|
2413
|
+
dataSuffix?: `0x${string}`;
|
|
2414
|
+
gas?: bigint;
|
|
2415
|
+
gasPrice?: bigint;
|
|
2416
|
+
maxFeePerGas?: bigint;
|
|
2417
|
+
maxPriorityFeePerGas?: bigint;
|
|
2418
|
+
nonce?: number;
|
|
2419
|
+
value?: bigint;
|
|
2420
|
+
}): Promise<`0x${string}`> {
|
|
2421
|
+
if (!this.contract.write) {
|
|
2422
|
+
throw new Error('Wallet client is required for write operations');
|
|
2423
|
+
}
|
|
2424
|
+
return this.contract.write.setChainRateLimiterConfig([remoteChainSelector, outboundConfig, inboundConfig] as const, options) as Promise<`0x${string}`>;
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
/**
|
|
2428
|
+
* setCurrentBridgedAmount
|
|
2429
|
+
* nonpayable
|
|
2430
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2431
|
+
*/
|
|
2432
|
+
async setCurrentBridgedAmount(newCurrentBridged: bigint, options?: {
|
|
2433
|
+
accessList?: import('viem').AccessList;
|
|
2434
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2435
|
+
chain?: import('viem').Chain | null;
|
|
2436
|
+
dataSuffix?: `0x${string}`;
|
|
2437
|
+
gas?: bigint;
|
|
2438
|
+
gasPrice?: bigint;
|
|
2439
|
+
maxFeePerGas?: bigint;
|
|
2440
|
+
maxPriorityFeePerGas?: bigint;
|
|
2441
|
+
nonce?: number;
|
|
2442
|
+
value?: bigint;
|
|
2443
|
+
}): Promise<`0x${string}`> {
|
|
2444
|
+
if (!this.contract.write) {
|
|
2445
|
+
throw new Error('Wallet client is required for write operations');
|
|
2446
|
+
}
|
|
2447
|
+
return this.contract.write.setCurrentBridgedAmount([newCurrentBridged] as const, options) as Promise<`0x${string}`>;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
/**
|
|
2451
|
+
* setRateLimitAdmin
|
|
2452
|
+
* nonpayable
|
|
2453
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2454
|
+
*/
|
|
2455
|
+
async setRateLimitAdmin(rateLimitAdmin: `0x${string}`, options?: {
|
|
2456
|
+
accessList?: import('viem').AccessList;
|
|
2457
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2458
|
+
chain?: import('viem').Chain | null;
|
|
2459
|
+
dataSuffix?: `0x${string}`;
|
|
2460
|
+
gas?: bigint;
|
|
2461
|
+
gasPrice?: bigint;
|
|
2462
|
+
maxFeePerGas?: bigint;
|
|
2463
|
+
maxPriorityFeePerGas?: bigint;
|
|
2464
|
+
nonce?: number;
|
|
2465
|
+
value?: bigint;
|
|
2466
|
+
}): Promise<`0x${string}`> {
|
|
2467
|
+
if (!this.contract.write) {
|
|
2468
|
+
throw new Error('Wallet client is required for write operations');
|
|
2469
|
+
}
|
|
2470
|
+
return this.contract.write.setRateLimitAdmin([rateLimitAdmin] as const, options) as Promise<`0x${string}`>;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* setRebalancer
|
|
2475
|
+
* nonpayable
|
|
2476
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2477
|
+
*/
|
|
2478
|
+
async setRebalancer(rebalancer: `0x${string}`, options?: {
|
|
2479
|
+
accessList?: import('viem').AccessList;
|
|
2480
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2481
|
+
chain?: import('viem').Chain | null;
|
|
2482
|
+
dataSuffix?: `0x${string}`;
|
|
2483
|
+
gas?: bigint;
|
|
2484
|
+
gasPrice?: bigint;
|
|
2485
|
+
maxFeePerGas?: bigint;
|
|
2486
|
+
maxPriorityFeePerGas?: bigint;
|
|
2487
|
+
nonce?: number;
|
|
2488
|
+
value?: bigint;
|
|
2489
|
+
}): Promise<`0x${string}`> {
|
|
2490
|
+
if (!this.contract.write) {
|
|
2491
|
+
throw new Error('Wallet client is required for write operations');
|
|
2492
|
+
}
|
|
2493
|
+
return this.contract.write.setRebalancer([rebalancer] as const, options) as Promise<`0x${string}`>;
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
/**
|
|
2497
|
+
* setRouter
|
|
2498
|
+
* nonpayable
|
|
2499
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2500
|
+
*/
|
|
2501
|
+
async setRouter(newRouter: `0x${string}`, options?: {
|
|
2502
|
+
accessList?: import('viem').AccessList;
|
|
2503
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2504
|
+
chain?: import('viem').Chain | null;
|
|
2505
|
+
dataSuffix?: `0x${string}`;
|
|
2506
|
+
gas?: bigint;
|
|
2507
|
+
gasPrice?: bigint;
|
|
2508
|
+
maxFeePerGas?: bigint;
|
|
2509
|
+
maxPriorityFeePerGas?: bigint;
|
|
2510
|
+
nonce?: number;
|
|
2511
|
+
value?: bigint;
|
|
2512
|
+
}): Promise<`0x${string}`> {
|
|
2513
|
+
if (!this.contract.write) {
|
|
2514
|
+
throw new Error('Wallet client is required for write operations');
|
|
2515
|
+
}
|
|
2516
|
+
return this.contract.write.setRouter([newRouter] as const, options) as Promise<`0x${string}`>;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* transferLiquidity
|
|
2521
|
+
* nonpayable
|
|
2522
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2523
|
+
*/
|
|
2524
|
+
async transferLiquidity(from: `0x${string}`, amount: bigint, options?: {
|
|
2525
|
+
accessList?: import('viem').AccessList;
|
|
2526
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2527
|
+
chain?: import('viem').Chain | null;
|
|
2528
|
+
dataSuffix?: `0x${string}`;
|
|
2529
|
+
gas?: bigint;
|
|
2530
|
+
gasPrice?: bigint;
|
|
2531
|
+
maxFeePerGas?: bigint;
|
|
2532
|
+
maxPriorityFeePerGas?: bigint;
|
|
2533
|
+
nonce?: number;
|
|
2534
|
+
value?: bigint;
|
|
2535
|
+
}): Promise<`0x${string}`> {
|
|
2536
|
+
if (!this.contract.write) {
|
|
2537
|
+
throw new Error('Wallet client is required for write operations');
|
|
2538
|
+
}
|
|
2539
|
+
return this.contract.write.transferLiquidity([from, amount] as const, options) as Promise<`0x${string}`>;
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
/**
|
|
2543
|
+
* transferOwnership
|
|
2544
|
+
* nonpayable
|
|
2545
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2546
|
+
*/
|
|
2547
|
+
async transferOwnership(to: `0x${string}`, options?: {
|
|
2548
|
+
accessList?: import('viem').AccessList;
|
|
2549
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2550
|
+
chain?: import('viem').Chain | null;
|
|
2551
|
+
dataSuffix?: `0x${string}`;
|
|
2552
|
+
gas?: bigint;
|
|
2553
|
+
gasPrice?: bigint;
|
|
2554
|
+
maxFeePerGas?: bigint;
|
|
2555
|
+
maxPriorityFeePerGas?: bigint;
|
|
2556
|
+
nonce?: number;
|
|
2557
|
+
value?: bigint;
|
|
2558
|
+
}): Promise<`0x${string}`> {
|
|
2559
|
+
if (!this.contract.write) {
|
|
2560
|
+
throw new Error('Wallet client is required for write operations');
|
|
2561
|
+
}
|
|
2562
|
+
return this.contract.write.transferOwnership([to] as const, options) as Promise<`0x${string}`>;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* withdrawLiquidity
|
|
2567
|
+
* nonpayable
|
|
2568
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2569
|
+
*/
|
|
2570
|
+
async withdrawLiquidity(amount: bigint, options?: {
|
|
2571
|
+
accessList?: import('viem').AccessList;
|
|
2572
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2573
|
+
chain?: import('viem').Chain | null;
|
|
2574
|
+
dataSuffix?: `0x${string}`;
|
|
2575
|
+
gas?: bigint;
|
|
2576
|
+
gasPrice?: bigint;
|
|
2577
|
+
maxFeePerGas?: bigint;
|
|
2578
|
+
maxPriorityFeePerGas?: bigint;
|
|
2579
|
+
nonce?: number;
|
|
2580
|
+
value?: bigint;
|
|
2581
|
+
}): Promise<`0x${string}`> {
|
|
2582
|
+
if (!this.contract.write) {
|
|
2583
|
+
throw new Error('Wallet client is required for write operations');
|
|
2584
|
+
}
|
|
2585
|
+
return this.contract.write.withdrawLiquidity([amount] as const, options) as Promise<`0x${string}`>;
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
|
|
2589
|
+
|
|
2590
|
+
/**
|
|
2591
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
2592
|
+
*
|
|
2593
|
+
* @example
|
|
2594
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
2595
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
2596
|
+
* console.log('Would succeed:', result.result);
|
|
2597
|
+
*/
|
|
2598
|
+
get simulate() {
|
|
2599
|
+
const contract = this.contract;
|
|
2600
|
+
if (!contract.simulate) {
|
|
2601
|
+
throw new Error('Public client is required for simulation');
|
|
2602
|
+
}
|
|
2603
|
+
return {
|
|
2604
|
+
/**
|
|
2605
|
+
* Simulate acceptOwnership
|
|
2606
|
+
* Returns gas estimate and result without sending transaction
|
|
2607
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2608
|
+
*/
|
|
2609
|
+
async acceptOwnership(options?: {
|
|
2610
|
+
accessList?: import('viem').AccessList;
|
|
2611
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2612
|
+
chain?: import('viem').Chain | null;
|
|
2613
|
+
dataSuffix?: `0x${string}`;
|
|
2614
|
+
gas?: bigint;
|
|
2615
|
+
gasPrice?: bigint;
|
|
2616
|
+
maxFeePerGas?: bigint;
|
|
2617
|
+
maxPriorityFeePerGas?: bigint;
|
|
2618
|
+
nonce?: number;
|
|
2619
|
+
value?: bigint;
|
|
2620
|
+
}): Promise<void> {
|
|
2621
|
+
return contract.simulate.acceptOwnership(options) as Promise<void>;
|
|
2622
|
+
},
|
|
2623
|
+
/**
|
|
2624
|
+
* Simulate addRemotePool
|
|
2625
|
+
* Returns gas estimate and result without sending transaction
|
|
2626
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2627
|
+
*/
|
|
2628
|
+
async addRemotePool(remoteChainSelector: bigint, remotePoolAddress: `0x${string}`, options?: {
|
|
2629
|
+
accessList?: import('viem').AccessList;
|
|
2630
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2631
|
+
chain?: import('viem').Chain | null;
|
|
2632
|
+
dataSuffix?: `0x${string}`;
|
|
2633
|
+
gas?: bigint;
|
|
2634
|
+
gasPrice?: bigint;
|
|
2635
|
+
maxFeePerGas?: bigint;
|
|
2636
|
+
maxPriorityFeePerGas?: bigint;
|
|
2637
|
+
nonce?: number;
|
|
2638
|
+
value?: bigint;
|
|
2639
|
+
}): Promise<void> {
|
|
2640
|
+
return contract.simulate.addRemotePool([remoteChainSelector, remotePoolAddress] as const, options) as Promise<void>;
|
|
2641
|
+
},
|
|
2642
|
+
/**
|
|
2643
|
+
* Simulate applyAllowListUpdates
|
|
2644
|
+
* Returns gas estimate and result without sending transaction
|
|
2645
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2646
|
+
*/
|
|
2647
|
+
async applyAllowListUpdates(removes: `0x${string}`[], adds: `0x${string}`[], options?: {
|
|
2648
|
+
accessList?: import('viem').AccessList;
|
|
2649
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2650
|
+
chain?: import('viem').Chain | null;
|
|
2651
|
+
dataSuffix?: `0x${string}`;
|
|
2652
|
+
gas?: bigint;
|
|
2653
|
+
gasPrice?: bigint;
|
|
2654
|
+
maxFeePerGas?: bigint;
|
|
2655
|
+
maxPriorityFeePerGas?: bigint;
|
|
2656
|
+
nonce?: number;
|
|
2657
|
+
value?: bigint;
|
|
2658
|
+
}): Promise<void> {
|
|
2659
|
+
return contract.simulate.applyAllowListUpdates([removes, adds] as const, options) as Promise<void>;
|
|
2660
|
+
},
|
|
2661
|
+
/**
|
|
2662
|
+
* Simulate applyChainUpdates
|
|
2663
|
+
* Returns gas estimate and result without sending transaction
|
|
2664
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2665
|
+
*/
|
|
2666
|
+
async applyChainUpdates(remoteChainSelectorsToRemove: bigint[], chainsToAdd: UpgradeableTokenPool_ChainUpdate[], options?: {
|
|
2667
|
+
accessList?: import('viem').AccessList;
|
|
2668
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2669
|
+
chain?: import('viem').Chain | null;
|
|
2670
|
+
dataSuffix?: `0x${string}`;
|
|
2671
|
+
gas?: bigint;
|
|
2672
|
+
gasPrice?: bigint;
|
|
2673
|
+
maxFeePerGas?: bigint;
|
|
2674
|
+
maxPriorityFeePerGas?: bigint;
|
|
2675
|
+
nonce?: number;
|
|
2676
|
+
value?: bigint;
|
|
2677
|
+
}): Promise<void> {
|
|
2678
|
+
return contract.simulate.applyChainUpdates([remoteChainSelectorsToRemove, chainsToAdd] as const, options) as Promise<void>;
|
|
2679
|
+
},
|
|
2680
|
+
/**
|
|
2681
|
+
* Simulate initialize
|
|
2682
|
+
* Returns gas estimate and result without sending transaction
|
|
2683
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2684
|
+
*/
|
|
2685
|
+
async initialize(owner_: `0x${string}`, allowlist: `0x${string}`[], router: `0x${string}`, bridgeLimit: bigint, options?: {
|
|
2686
|
+
accessList?: import('viem').AccessList;
|
|
2687
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2688
|
+
chain?: import('viem').Chain | null;
|
|
2689
|
+
dataSuffix?: `0x${string}`;
|
|
2690
|
+
gas?: bigint;
|
|
2691
|
+
gasPrice?: bigint;
|
|
2692
|
+
maxFeePerGas?: bigint;
|
|
2693
|
+
maxPriorityFeePerGas?: bigint;
|
|
2694
|
+
nonce?: number;
|
|
2695
|
+
value?: bigint;
|
|
2696
|
+
}): Promise<void> {
|
|
2697
|
+
return contract.simulate.initialize([owner_, allowlist, router, bridgeLimit] as const, options) as Promise<void>;
|
|
2698
|
+
},
|
|
2699
|
+
/**
|
|
2700
|
+
* Simulate lockOrBurn
|
|
2701
|
+
* Returns gas estimate and result without sending transaction
|
|
2702
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2703
|
+
*/
|
|
2704
|
+
async lockOrBurn(lockOrBurnIn: Pool_LockOrBurnInV1, options?: {
|
|
2705
|
+
accessList?: import('viem').AccessList;
|
|
2706
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2707
|
+
chain?: import('viem').Chain | null;
|
|
2708
|
+
dataSuffix?: `0x${string}`;
|
|
2709
|
+
gas?: bigint;
|
|
2710
|
+
gasPrice?: bigint;
|
|
2711
|
+
maxFeePerGas?: bigint;
|
|
2712
|
+
maxPriorityFeePerGas?: bigint;
|
|
2713
|
+
nonce?: number;
|
|
2714
|
+
value?: bigint;
|
|
2715
|
+
}): Promise<Pool_LockOrBurnOutV1> {
|
|
2716
|
+
return contract.simulate.lockOrBurn([lockOrBurnIn] as const, options) as Promise<Pool_LockOrBurnOutV1>;
|
|
2717
|
+
},
|
|
2718
|
+
/**
|
|
2719
|
+
* Simulate provideLiquidity
|
|
2720
|
+
* Returns gas estimate and result without sending transaction
|
|
2721
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2722
|
+
*/
|
|
2723
|
+
async provideLiquidity(amount: bigint, options?: {
|
|
2724
|
+
accessList?: import('viem').AccessList;
|
|
2725
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2726
|
+
chain?: import('viem').Chain | null;
|
|
2727
|
+
dataSuffix?: `0x${string}`;
|
|
2728
|
+
gas?: bigint;
|
|
2729
|
+
gasPrice?: bigint;
|
|
2730
|
+
maxFeePerGas?: bigint;
|
|
2731
|
+
maxPriorityFeePerGas?: bigint;
|
|
2732
|
+
nonce?: number;
|
|
2733
|
+
value?: bigint;
|
|
2734
|
+
}): Promise<void> {
|
|
2735
|
+
return contract.simulate.provideLiquidity([amount] as const, options) as Promise<void>;
|
|
2736
|
+
},
|
|
2737
|
+
/**
|
|
2738
|
+
* Simulate releaseOrMint
|
|
2739
|
+
* Returns gas estimate and result without sending transaction
|
|
2740
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2741
|
+
*/
|
|
2742
|
+
async releaseOrMint(releaseOrMintIn: Pool_ReleaseOrMintInV1, options?: {
|
|
2743
|
+
accessList?: import('viem').AccessList;
|
|
2744
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2745
|
+
chain?: import('viem').Chain | null;
|
|
2746
|
+
dataSuffix?: `0x${string}`;
|
|
2747
|
+
gas?: bigint;
|
|
2748
|
+
gasPrice?: bigint;
|
|
2749
|
+
maxFeePerGas?: bigint;
|
|
2750
|
+
maxPriorityFeePerGas?: bigint;
|
|
2751
|
+
nonce?: number;
|
|
2752
|
+
value?: bigint;
|
|
2753
|
+
}): Promise<Pool_ReleaseOrMintOutV1> {
|
|
2754
|
+
return contract.simulate.releaseOrMint([releaseOrMintIn] as const, options) as Promise<Pool_ReleaseOrMintOutV1>;
|
|
2755
|
+
},
|
|
2756
|
+
/**
|
|
2757
|
+
* Simulate removeRemotePool
|
|
2758
|
+
* Returns gas estimate and result without sending transaction
|
|
2759
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2760
|
+
*/
|
|
2761
|
+
async removeRemotePool(remoteChainSelector: bigint, remotePoolAddress: `0x${string}`, options?: {
|
|
2762
|
+
accessList?: import('viem').AccessList;
|
|
2763
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2764
|
+
chain?: import('viem').Chain | null;
|
|
2765
|
+
dataSuffix?: `0x${string}`;
|
|
2766
|
+
gas?: bigint;
|
|
2767
|
+
gasPrice?: bigint;
|
|
2768
|
+
maxFeePerGas?: bigint;
|
|
2769
|
+
maxPriorityFeePerGas?: bigint;
|
|
2770
|
+
nonce?: number;
|
|
2771
|
+
value?: bigint;
|
|
2772
|
+
}): Promise<void> {
|
|
2773
|
+
return contract.simulate.removeRemotePool([remoteChainSelector, remotePoolAddress] as const, options) as Promise<void>;
|
|
2774
|
+
},
|
|
2775
|
+
/**
|
|
2776
|
+
* Simulate setBridgeLimit
|
|
2777
|
+
* Returns gas estimate and result without sending transaction
|
|
2778
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2779
|
+
*/
|
|
2780
|
+
async setBridgeLimit(newBridgeLimit: bigint, options?: {
|
|
2781
|
+
accessList?: import('viem').AccessList;
|
|
2782
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2783
|
+
chain?: import('viem').Chain | null;
|
|
2784
|
+
dataSuffix?: `0x${string}`;
|
|
2785
|
+
gas?: bigint;
|
|
2786
|
+
gasPrice?: bigint;
|
|
2787
|
+
maxFeePerGas?: bigint;
|
|
2788
|
+
maxPriorityFeePerGas?: bigint;
|
|
2789
|
+
nonce?: number;
|
|
2790
|
+
value?: bigint;
|
|
2791
|
+
}): Promise<void> {
|
|
2792
|
+
return contract.simulate.setBridgeLimit([newBridgeLimit] as const, options) as Promise<void>;
|
|
2793
|
+
},
|
|
2794
|
+
/**
|
|
2795
|
+
* Simulate setBridgeLimitAdmin
|
|
2796
|
+
* Returns gas estimate and result without sending transaction
|
|
2797
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2798
|
+
*/
|
|
2799
|
+
async setBridgeLimitAdmin(bridgeLimitAdmin: `0x${string}`, options?: {
|
|
2800
|
+
accessList?: import('viem').AccessList;
|
|
2801
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2802
|
+
chain?: import('viem').Chain | null;
|
|
2803
|
+
dataSuffix?: `0x${string}`;
|
|
2804
|
+
gas?: bigint;
|
|
2805
|
+
gasPrice?: bigint;
|
|
2806
|
+
maxFeePerGas?: bigint;
|
|
2807
|
+
maxPriorityFeePerGas?: bigint;
|
|
2808
|
+
nonce?: number;
|
|
2809
|
+
value?: bigint;
|
|
2810
|
+
}): Promise<void> {
|
|
2811
|
+
return contract.simulate.setBridgeLimitAdmin([bridgeLimitAdmin] as const, options) as Promise<void>;
|
|
2812
|
+
},
|
|
2813
|
+
/**
|
|
2814
|
+
* Simulate setChainRateLimiterConfig
|
|
2815
|
+
* Returns gas estimate and result without sending transaction
|
|
2816
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2817
|
+
*/
|
|
2818
|
+
async setChainRateLimiterConfig(remoteChainSelector: bigint, outboundConfig: RateLimiter_Config, inboundConfig: RateLimiter_Config, options?: {
|
|
2819
|
+
accessList?: import('viem').AccessList;
|
|
2820
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2821
|
+
chain?: import('viem').Chain | null;
|
|
2822
|
+
dataSuffix?: `0x${string}`;
|
|
2823
|
+
gas?: bigint;
|
|
2824
|
+
gasPrice?: bigint;
|
|
2825
|
+
maxFeePerGas?: bigint;
|
|
2826
|
+
maxPriorityFeePerGas?: bigint;
|
|
2827
|
+
nonce?: number;
|
|
2828
|
+
value?: bigint;
|
|
2829
|
+
}): Promise<void> {
|
|
2830
|
+
return contract.simulate.setChainRateLimiterConfig([remoteChainSelector, outboundConfig, inboundConfig] as const, options) as Promise<void>;
|
|
2831
|
+
},
|
|
2832
|
+
/**
|
|
2833
|
+
* Simulate setCurrentBridgedAmount
|
|
2834
|
+
* Returns gas estimate and result without sending transaction
|
|
2835
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2836
|
+
*/
|
|
2837
|
+
async setCurrentBridgedAmount(newCurrentBridged: bigint, options?: {
|
|
2838
|
+
accessList?: import('viem').AccessList;
|
|
2839
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2840
|
+
chain?: import('viem').Chain | null;
|
|
2841
|
+
dataSuffix?: `0x${string}`;
|
|
2842
|
+
gas?: bigint;
|
|
2843
|
+
gasPrice?: bigint;
|
|
2844
|
+
maxFeePerGas?: bigint;
|
|
2845
|
+
maxPriorityFeePerGas?: bigint;
|
|
2846
|
+
nonce?: number;
|
|
2847
|
+
value?: bigint;
|
|
2848
|
+
}): Promise<void> {
|
|
2849
|
+
return contract.simulate.setCurrentBridgedAmount([newCurrentBridged] as const, options) as Promise<void>;
|
|
2850
|
+
},
|
|
2851
|
+
/**
|
|
2852
|
+
* Simulate setRateLimitAdmin
|
|
2853
|
+
* Returns gas estimate and result without sending transaction
|
|
2854
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2855
|
+
*/
|
|
2856
|
+
async setRateLimitAdmin(rateLimitAdmin: `0x${string}`, options?: {
|
|
2857
|
+
accessList?: import('viem').AccessList;
|
|
2858
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2859
|
+
chain?: import('viem').Chain | null;
|
|
2860
|
+
dataSuffix?: `0x${string}`;
|
|
2861
|
+
gas?: bigint;
|
|
2862
|
+
gasPrice?: bigint;
|
|
2863
|
+
maxFeePerGas?: bigint;
|
|
2864
|
+
maxPriorityFeePerGas?: bigint;
|
|
2865
|
+
nonce?: number;
|
|
2866
|
+
value?: bigint;
|
|
2867
|
+
}): Promise<void> {
|
|
2868
|
+
return contract.simulate.setRateLimitAdmin([rateLimitAdmin] as const, options) as Promise<void>;
|
|
2869
|
+
},
|
|
2870
|
+
/**
|
|
2871
|
+
* Simulate setRebalancer
|
|
2872
|
+
* Returns gas estimate and result without sending transaction
|
|
2873
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2874
|
+
*/
|
|
2875
|
+
async setRebalancer(rebalancer: `0x${string}`, options?: {
|
|
2876
|
+
accessList?: import('viem').AccessList;
|
|
2877
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2878
|
+
chain?: import('viem').Chain | null;
|
|
2879
|
+
dataSuffix?: `0x${string}`;
|
|
2880
|
+
gas?: bigint;
|
|
2881
|
+
gasPrice?: bigint;
|
|
2882
|
+
maxFeePerGas?: bigint;
|
|
2883
|
+
maxPriorityFeePerGas?: bigint;
|
|
2884
|
+
nonce?: number;
|
|
2885
|
+
value?: bigint;
|
|
2886
|
+
}): Promise<void> {
|
|
2887
|
+
return contract.simulate.setRebalancer([rebalancer] as const, options) as Promise<void>;
|
|
2888
|
+
},
|
|
2889
|
+
/**
|
|
2890
|
+
* Simulate setRouter
|
|
2891
|
+
* Returns gas estimate and result without sending transaction
|
|
2892
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2893
|
+
*/
|
|
2894
|
+
async setRouter(newRouter: `0x${string}`, options?: {
|
|
2895
|
+
accessList?: import('viem').AccessList;
|
|
2896
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2897
|
+
chain?: import('viem').Chain | null;
|
|
2898
|
+
dataSuffix?: `0x${string}`;
|
|
2899
|
+
gas?: bigint;
|
|
2900
|
+
gasPrice?: bigint;
|
|
2901
|
+
maxFeePerGas?: bigint;
|
|
2902
|
+
maxPriorityFeePerGas?: bigint;
|
|
2903
|
+
nonce?: number;
|
|
2904
|
+
value?: bigint;
|
|
2905
|
+
}): Promise<void> {
|
|
2906
|
+
return contract.simulate.setRouter([newRouter] as const, options) as Promise<void>;
|
|
2907
|
+
},
|
|
2908
|
+
/**
|
|
2909
|
+
* Simulate transferLiquidity
|
|
2910
|
+
* Returns gas estimate and result without sending transaction
|
|
2911
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2912
|
+
*/
|
|
2913
|
+
async transferLiquidity(from: `0x${string}`, amount: bigint, options?: {
|
|
2914
|
+
accessList?: import('viem').AccessList;
|
|
2915
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2916
|
+
chain?: import('viem').Chain | null;
|
|
2917
|
+
dataSuffix?: `0x${string}`;
|
|
2918
|
+
gas?: bigint;
|
|
2919
|
+
gasPrice?: bigint;
|
|
2920
|
+
maxFeePerGas?: bigint;
|
|
2921
|
+
maxPriorityFeePerGas?: bigint;
|
|
2922
|
+
nonce?: number;
|
|
2923
|
+
value?: bigint;
|
|
2924
|
+
}): Promise<void> {
|
|
2925
|
+
return contract.simulate.transferLiquidity([from, amount] as const, options) as Promise<void>;
|
|
2926
|
+
},
|
|
2927
|
+
/**
|
|
2928
|
+
* Simulate transferOwnership
|
|
2929
|
+
* Returns gas estimate and result without sending transaction
|
|
2930
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2931
|
+
*/
|
|
2932
|
+
async transferOwnership(to: `0x${string}`, options?: {
|
|
2933
|
+
accessList?: import('viem').AccessList;
|
|
2934
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2935
|
+
chain?: import('viem').Chain | null;
|
|
2936
|
+
dataSuffix?: `0x${string}`;
|
|
2937
|
+
gas?: bigint;
|
|
2938
|
+
gasPrice?: bigint;
|
|
2939
|
+
maxFeePerGas?: bigint;
|
|
2940
|
+
maxPriorityFeePerGas?: bigint;
|
|
2941
|
+
nonce?: number;
|
|
2942
|
+
value?: bigint;
|
|
2943
|
+
}): Promise<void> {
|
|
2944
|
+
return contract.simulate.transferOwnership([to] as const, options) as Promise<void>;
|
|
2945
|
+
},
|
|
2946
|
+
/**
|
|
2947
|
+
* Simulate withdrawLiquidity
|
|
2948
|
+
* Returns gas estimate and result without sending transaction
|
|
2949
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
2950
|
+
*/
|
|
2951
|
+
async withdrawLiquidity(amount: bigint, options?: {
|
|
2952
|
+
accessList?: import('viem').AccessList;
|
|
2953
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
2954
|
+
chain?: import('viem').Chain | null;
|
|
2955
|
+
dataSuffix?: `0x${string}`;
|
|
2956
|
+
gas?: bigint;
|
|
2957
|
+
gasPrice?: bigint;
|
|
2958
|
+
maxFeePerGas?: bigint;
|
|
2959
|
+
maxPriorityFeePerGas?: bigint;
|
|
2960
|
+
nonce?: number;
|
|
2961
|
+
value?: bigint;
|
|
2962
|
+
}): Promise<void> {
|
|
2963
|
+
return contract.simulate.withdrawLiquidity([amount] as const, options) as Promise<void>;
|
|
2964
|
+
}
|
|
2965
|
+
};
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
/**
|
|
2969
|
+
* Watch contract events
|
|
2970
|
+
*
|
|
2971
|
+
* @example
|
|
2972
|
+
* // Watch all Transfer events
|
|
2973
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2974
|
+
* console.log('Transfer:', event);
|
|
2975
|
+
* });
|
|
2976
|
+
*
|
|
2977
|
+
* // Stop watching
|
|
2978
|
+
* unwatch();
|
|
2979
|
+
*/
|
|
2980
|
+
get watch() {
|
|
2981
|
+
return {
|
|
2982
|
+
/**
|
|
2983
|
+
* Watch AllowListAdd events
|
|
2984
|
+
* @param callback Function to call when event is emitted
|
|
2985
|
+
* @param filter Optional filter for indexed parameters
|
|
2986
|
+
* @returns Unwatch function to stop listening
|
|
2987
|
+
*/
|
|
2988
|
+
AllowListAdd: (callback: (event: { sender: `0x${string}` }) => void) => {
|
|
2989
|
+
return this.publicClient.watchContractEvent({
|
|
2990
|
+
address: this.contractAddress,
|
|
2991
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
2992
|
+
eventName: 'AllowListAdd',
|
|
2993
|
+
|
|
2994
|
+
onLogs: (logs: any[]) => {
|
|
2995
|
+
logs.forEach((log: any) => {
|
|
2996
|
+
callback(log.args as any);
|
|
2997
|
+
});
|
|
2998
|
+
},
|
|
2999
|
+
}) as () => void;
|
|
3000
|
+
},
|
|
3001
|
+
/**
|
|
3002
|
+
* Watch AllowListRemove events
|
|
3003
|
+
* @param callback Function to call when event is emitted
|
|
3004
|
+
* @param filter Optional filter for indexed parameters
|
|
3005
|
+
* @returns Unwatch function to stop listening
|
|
3006
|
+
*/
|
|
3007
|
+
AllowListRemove: (callback: (event: { sender: `0x${string}` }) => void) => {
|
|
3008
|
+
return this.publicClient.watchContractEvent({
|
|
3009
|
+
address: this.contractAddress,
|
|
3010
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3011
|
+
eventName: 'AllowListRemove',
|
|
3012
|
+
|
|
3013
|
+
onLogs: (logs: any[]) => {
|
|
3014
|
+
logs.forEach((log: any) => {
|
|
3015
|
+
callback(log.args as any);
|
|
3016
|
+
});
|
|
3017
|
+
},
|
|
3018
|
+
}) as () => void;
|
|
3019
|
+
},
|
|
3020
|
+
/**
|
|
3021
|
+
* Watch BridgeLimitAdminUpdated events
|
|
3022
|
+
* @param callback Function to call when event is emitted
|
|
3023
|
+
* @param filter Optional filter for indexed parameters
|
|
3024
|
+
* @returns Unwatch function to stop listening
|
|
3025
|
+
*/
|
|
3026
|
+
BridgeLimitAdminUpdated: (callback: (event: { oldAdmin: `0x${string}`; newAdmin: `0x${string}` }) => void, filter?: { oldAdmin?: `0x${string}` | `0x${string}`[] | null; newAdmin?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3027
|
+
return this.publicClient.watchContractEvent({
|
|
3028
|
+
address: this.contractAddress,
|
|
3029
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3030
|
+
eventName: 'BridgeLimitAdminUpdated',
|
|
3031
|
+
args: filter as any,
|
|
3032
|
+
onLogs: (logs: any[]) => {
|
|
3033
|
+
logs.forEach((log: any) => {
|
|
3034
|
+
callback(log.args as any);
|
|
3035
|
+
});
|
|
3036
|
+
},
|
|
3037
|
+
}) as () => void;
|
|
3038
|
+
},
|
|
3039
|
+
/**
|
|
3040
|
+
* Watch BridgeLimitUpdated events
|
|
3041
|
+
* @param callback Function to call when event is emitted
|
|
3042
|
+
* @param filter Optional filter for indexed parameters
|
|
3043
|
+
* @returns Unwatch function to stop listening
|
|
3044
|
+
*/
|
|
3045
|
+
BridgeLimitUpdated: (callback: (event: { oldBridgeLimit: bigint; newBridgeLimit: bigint }) => void) => {
|
|
3046
|
+
return this.publicClient.watchContractEvent({
|
|
3047
|
+
address: this.contractAddress,
|
|
3048
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3049
|
+
eventName: 'BridgeLimitUpdated',
|
|
3050
|
+
|
|
3051
|
+
onLogs: (logs: any[]) => {
|
|
3052
|
+
logs.forEach((log: any) => {
|
|
3053
|
+
callback(log.args as any);
|
|
3054
|
+
});
|
|
3055
|
+
},
|
|
3056
|
+
}) as () => void;
|
|
3057
|
+
},
|
|
3058
|
+
/**
|
|
3059
|
+
* Watch Burned events
|
|
3060
|
+
* @param callback Function to call when event is emitted
|
|
3061
|
+
* @param filter Optional filter for indexed parameters
|
|
3062
|
+
* @returns Unwatch function to stop listening
|
|
3063
|
+
*/
|
|
3064
|
+
Burned: (callback: (event: { sender: `0x${string}`; amount: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3065
|
+
return this.publicClient.watchContractEvent({
|
|
3066
|
+
address: this.contractAddress,
|
|
3067
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3068
|
+
eventName: 'Burned',
|
|
3069
|
+
args: filter as any,
|
|
3070
|
+
onLogs: (logs: any[]) => {
|
|
3071
|
+
logs.forEach((log: any) => {
|
|
3072
|
+
callback(log.args as any);
|
|
3073
|
+
});
|
|
3074
|
+
},
|
|
3075
|
+
}) as () => void;
|
|
3076
|
+
},
|
|
3077
|
+
/**
|
|
3078
|
+
* Watch ChainAdded events
|
|
3079
|
+
* @param callback Function to call when event is emitted
|
|
3080
|
+
* @param filter Optional filter for indexed parameters
|
|
3081
|
+
* @returns Unwatch function to stop listening
|
|
3082
|
+
*/
|
|
3083
|
+
ChainAdded: (callback: (event: { remoteChainSelector: bigint; remoteToken: `0x${string}`; outboundRateLimiterConfig: RateLimiter_Config; inboundRateLimiterConfig: RateLimiter_Config }) => void) => {
|
|
3084
|
+
return this.publicClient.watchContractEvent({
|
|
3085
|
+
address: this.contractAddress,
|
|
3086
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3087
|
+
eventName: 'ChainAdded',
|
|
3088
|
+
|
|
3089
|
+
onLogs: (logs: any[]) => {
|
|
3090
|
+
logs.forEach((log: any) => {
|
|
3091
|
+
callback(log.args as any);
|
|
3092
|
+
});
|
|
3093
|
+
},
|
|
3094
|
+
}) as () => void;
|
|
3095
|
+
},
|
|
3096
|
+
/**
|
|
3097
|
+
* Watch ChainConfigured events
|
|
3098
|
+
* @param callback Function to call when event is emitted
|
|
3099
|
+
* @param filter Optional filter for indexed parameters
|
|
3100
|
+
* @returns Unwatch function to stop listening
|
|
3101
|
+
*/
|
|
3102
|
+
ChainConfigured: (callback: (event: { remoteChainSelector: bigint; outboundRateLimiterConfig: RateLimiter_Config; inboundRateLimiterConfig: RateLimiter_Config }) => void) => {
|
|
3103
|
+
return this.publicClient.watchContractEvent({
|
|
3104
|
+
address: this.contractAddress,
|
|
3105
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3106
|
+
eventName: 'ChainConfigured',
|
|
3107
|
+
|
|
3108
|
+
onLogs: (logs: any[]) => {
|
|
3109
|
+
logs.forEach((log: any) => {
|
|
3110
|
+
callback(log.args as any);
|
|
3111
|
+
});
|
|
3112
|
+
},
|
|
3113
|
+
}) as () => void;
|
|
3114
|
+
},
|
|
3115
|
+
/**
|
|
3116
|
+
* Watch ChainRemoved events
|
|
3117
|
+
* @param callback Function to call when event is emitted
|
|
3118
|
+
* @param filter Optional filter for indexed parameters
|
|
3119
|
+
* @returns Unwatch function to stop listening
|
|
3120
|
+
*/
|
|
3121
|
+
ChainRemoved: (callback: (event: { remoteChainSelector: bigint }) => void) => {
|
|
3122
|
+
return this.publicClient.watchContractEvent({
|
|
3123
|
+
address: this.contractAddress,
|
|
3124
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3125
|
+
eventName: 'ChainRemoved',
|
|
3126
|
+
|
|
3127
|
+
onLogs: (logs: any[]) => {
|
|
3128
|
+
logs.forEach((log: any) => {
|
|
3129
|
+
callback(log.args as any);
|
|
3130
|
+
});
|
|
3131
|
+
},
|
|
3132
|
+
}) as () => void;
|
|
3133
|
+
},
|
|
3134
|
+
/**
|
|
3135
|
+
* Watch ConfigChanged events
|
|
3136
|
+
* @param callback Function to call when event is emitted
|
|
3137
|
+
* @param filter Optional filter for indexed parameters
|
|
3138
|
+
* @returns Unwatch function to stop listening
|
|
3139
|
+
*/
|
|
3140
|
+
ConfigChanged: (callback: (event: { config: RateLimiter_Config }) => void) => {
|
|
3141
|
+
return this.publicClient.watchContractEvent({
|
|
3142
|
+
address: this.contractAddress,
|
|
3143
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3144
|
+
eventName: 'ConfigChanged',
|
|
3145
|
+
|
|
3146
|
+
onLogs: (logs: any[]) => {
|
|
3147
|
+
logs.forEach((log: any) => {
|
|
3148
|
+
callback(log.args as any);
|
|
3149
|
+
});
|
|
3150
|
+
},
|
|
3151
|
+
}) as () => void;
|
|
3152
|
+
},
|
|
3153
|
+
/**
|
|
3154
|
+
* Watch Initialized events
|
|
3155
|
+
* @param callback Function to call when event is emitted
|
|
3156
|
+
* @param filter Optional filter for indexed parameters
|
|
3157
|
+
* @returns Unwatch function to stop listening
|
|
3158
|
+
*/
|
|
3159
|
+
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
3160
|
+
return this.publicClient.watchContractEvent({
|
|
3161
|
+
address: this.contractAddress,
|
|
3162
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3163
|
+
eventName: 'Initialized',
|
|
3164
|
+
|
|
3165
|
+
onLogs: (logs: any[]) => {
|
|
3166
|
+
logs.forEach((log: any) => {
|
|
3167
|
+
callback(log.args as any);
|
|
3168
|
+
});
|
|
3169
|
+
},
|
|
3170
|
+
}) as () => void;
|
|
3171
|
+
},
|
|
3172
|
+
/**
|
|
3173
|
+
* Watch LiquidityAdded events
|
|
3174
|
+
* @param callback Function to call when event is emitted
|
|
3175
|
+
* @param filter Optional filter for indexed parameters
|
|
3176
|
+
* @returns Unwatch function to stop listening
|
|
3177
|
+
*/
|
|
3178
|
+
LiquidityAdded: (callback: (event: { provider: `0x${string}`; amount: bigint }) => void, filter?: { provider?: `0x${string}` | `0x${string}`[] | null; amount?: bigint | bigint[] | null }) => {
|
|
3179
|
+
return this.publicClient.watchContractEvent({
|
|
3180
|
+
address: this.contractAddress,
|
|
3181
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3182
|
+
eventName: 'LiquidityAdded',
|
|
3183
|
+
args: filter as any,
|
|
3184
|
+
onLogs: (logs: any[]) => {
|
|
3185
|
+
logs.forEach((log: any) => {
|
|
3186
|
+
callback(log.args as any);
|
|
3187
|
+
});
|
|
3188
|
+
},
|
|
3189
|
+
}) as () => void;
|
|
3190
|
+
},
|
|
3191
|
+
/**
|
|
3192
|
+
* Watch LiquidityRemoved events
|
|
3193
|
+
* @param callback Function to call when event is emitted
|
|
3194
|
+
* @param filter Optional filter for indexed parameters
|
|
3195
|
+
* @returns Unwatch function to stop listening
|
|
3196
|
+
*/
|
|
3197
|
+
LiquidityRemoved: (callback: (event: { provider: `0x${string}`; amount: bigint }) => void, filter?: { provider?: `0x${string}` | `0x${string}`[] | null; amount?: bigint | bigint[] | null }) => {
|
|
3198
|
+
return this.publicClient.watchContractEvent({
|
|
3199
|
+
address: this.contractAddress,
|
|
3200
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3201
|
+
eventName: 'LiquidityRemoved',
|
|
3202
|
+
args: filter as any,
|
|
3203
|
+
onLogs: (logs: any[]) => {
|
|
3204
|
+
logs.forEach((log: any) => {
|
|
3205
|
+
callback(log.args as any);
|
|
3206
|
+
});
|
|
3207
|
+
},
|
|
3208
|
+
}) as () => void;
|
|
3209
|
+
},
|
|
3210
|
+
/**
|
|
3211
|
+
* Watch LiquidityTransferred events
|
|
3212
|
+
* @param callback Function to call when event is emitted
|
|
3213
|
+
* @param filter Optional filter for indexed parameters
|
|
3214
|
+
* @returns Unwatch function to stop listening
|
|
3215
|
+
*/
|
|
3216
|
+
LiquidityTransferred: (callback: (event: { from: `0x${string}`; amount: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3217
|
+
return this.publicClient.watchContractEvent({
|
|
3218
|
+
address: this.contractAddress,
|
|
3219
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3220
|
+
eventName: 'LiquidityTransferred',
|
|
3221
|
+
args: filter as any,
|
|
3222
|
+
onLogs: (logs: any[]) => {
|
|
3223
|
+
logs.forEach((log: any) => {
|
|
3224
|
+
callback(log.args as any);
|
|
3225
|
+
});
|
|
3226
|
+
},
|
|
3227
|
+
}) as () => void;
|
|
3228
|
+
},
|
|
3229
|
+
/**
|
|
3230
|
+
* Watch Locked events
|
|
3231
|
+
* @param callback Function to call when event is emitted
|
|
3232
|
+
* @param filter Optional filter for indexed parameters
|
|
3233
|
+
* @returns Unwatch function to stop listening
|
|
3234
|
+
*/
|
|
3235
|
+
Locked: (callback: (event: { sender: `0x${string}`; amount: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3236
|
+
return this.publicClient.watchContractEvent({
|
|
3237
|
+
address: this.contractAddress,
|
|
3238
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3239
|
+
eventName: 'Locked',
|
|
3240
|
+
args: filter as any,
|
|
3241
|
+
onLogs: (logs: any[]) => {
|
|
3242
|
+
logs.forEach((log: any) => {
|
|
3243
|
+
callback(log.args as any);
|
|
3244
|
+
});
|
|
3245
|
+
},
|
|
3246
|
+
}) as () => void;
|
|
3247
|
+
},
|
|
3248
|
+
/**
|
|
3249
|
+
* Watch Minted events
|
|
3250
|
+
* @param callback Function to call when event is emitted
|
|
3251
|
+
* @param filter Optional filter for indexed parameters
|
|
3252
|
+
* @returns Unwatch function to stop listening
|
|
3253
|
+
*/
|
|
3254
|
+
Minted: (callback: (event: { sender: `0x${string}`; recipient: `0x${string}`; amount: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; recipient?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3255
|
+
return this.publicClient.watchContractEvent({
|
|
3256
|
+
address: this.contractAddress,
|
|
3257
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3258
|
+
eventName: 'Minted',
|
|
3259
|
+
args: filter as any,
|
|
3260
|
+
onLogs: (logs: any[]) => {
|
|
3261
|
+
logs.forEach((log: any) => {
|
|
3262
|
+
callback(log.args as any);
|
|
3263
|
+
});
|
|
3264
|
+
},
|
|
3265
|
+
}) as () => void;
|
|
3266
|
+
},
|
|
3267
|
+
/**
|
|
3268
|
+
* Watch OwnershipTransferRequested events
|
|
3269
|
+
* @param callback Function to call when event is emitted
|
|
3270
|
+
* @param filter Optional filter for indexed parameters
|
|
3271
|
+
* @returns Unwatch function to stop listening
|
|
3272
|
+
*/
|
|
3273
|
+
OwnershipTransferRequested: (callback: (event: { from: `0x${string}`; to: `0x${string}` }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3274
|
+
return this.publicClient.watchContractEvent({
|
|
3275
|
+
address: this.contractAddress,
|
|
3276
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3277
|
+
eventName: 'OwnershipTransferRequested',
|
|
3278
|
+
args: filter as any,
|
|
3279
|
+
onLogs: (logs: any[]) => {
|
|
3280
|
+
logs.forEach((log: any) => {
|
|
3281
|
+
callback(log.args as any);
|
|
3282
|
+
});
|
|
3283
|
+
},
|
|
3284
|
+
}) as () => void;
|
|
3285
|
+
},
|
|
3286
|
+
/**
|
|
3287
|
+
* Watch OwnershipTransferred events
|
|
3288
|
+
* @param callback Function to call when event is emitted
|
|
3289
|
+
* @param filter Optional filter for indexed parameters
|
|
3290
|
+
* @returns Unwatch function to stop listening
|
|
3291
|
+
*/
|
|
3292
|
+
OwnershipTransferred: (callback: (event: { from: `0x${string}`; to: `0x${string}` }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3293
|
+
return this.publicClient.watchContractEvent({
|
|
3294
|
+
address: this.contractAddress,
|
|
3295
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3296
|
+
eventName: 'OwnershipTransferred',
|
|
3297
|
+
args: filter as any,
|
|
3298
|
+
onLogs: (logs: any[]) => {
|
|
3299
|
+
logs.forEach((log: any) => {
|
|
3300
|
+
callback(log.args as any);
|
|
3301
|
+
});
|
|
3302
|
+
},
|
|
3303
|
+
}) as () => void;
|
|
3304
|
+
},
|
|
3305
|
+
/**
|
|
3306
|
+
* Watch RateLimitAdminSet events
|
|
3307
|
+
* @param callback Function to call when event is emitted
|
|
3308
|
+
* @param filter Optional filter for indexed parameters
|
|
3309
|
+
* @returns Unwatch function to stop listening
|
|
3310
|
+
*/
|
|
3311
|
+
RateLimitAdminSet: (callback: (event: { rateLimitAdmin: `0x${string}` }) => void) => {
|
|
3312
|
+
return this.publicClient.watchContractEvent({
|
|
3313
|
+
address: this.contractAddress,
|
|
3314
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3315
|
+
eventName: 'RateLimitAdminSet',
|
|
3316
|
+
|
|
3317
|
+
onLogs: (logs: any[]) => {
|
|
3318
|
+
logs.forEach((log: any) => {
|
|
3319
|
+
callback(log.args as any);
|
|
3320
|
+
});
|
|
3321
|
+
},
|
|
3322
|
+
}) as () => void;
|
|
3323
|
+
},
|
|
3324
|
+
/**
|
|
3325
|
+
* Watch Released events
|
|
3326
|
+
* @param callback Function to call when event is emitted
|
|
3327
|
+
* @param filter Optional filter for indexed parameters
|
|
3328
|
+
* @returns Unwatch function to stop listening
|
|
3329
|
+
*/
|
|
3330
|
+
Released: (callback: (event: { sender: `0x${string}`; recipient: `0x${string}`; amount: bigint }) => void, filter?: { sender?: `0x${string}` | `0x${string}`[] | null; recipient?: `0x${string}` | `0x${string}`[] | null }) => {
|
|
3331
|
+
return this.publicClient.watchContractEvent({
|
|
3332
|
+
address: this.contractAddress,
|
|
3333
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3334
|
+
eventName: 'Released',
|
|
3335
|
+
args: filter as any,
|
|
3336
|
+
onLogs: (logs: any[]) => {
|
|
3337
|
+
logs.forEach((log: any) => {
|
|
3338
|
+
callback(log.args as any);
|
|
3339
|
+
});
|
|
3340
|
+
},
|
|
3341
|
+
}) as () => void;
|
|
3342
|
+
},
|
|
3343
|
+
/**
|
|
3344
|
+
* Watch RemotePoolAdded events
|
|
3345
|
+
* @param callback Function to call when event is emitted
|
|
3346
|
+
* @param filter Optional filter for indexed parameters
|
|
3347
|
+
* @returns Unwatch function to stop listening
|
|
3348
|
+
*/
|
|
3349
|
+
RemotePoolAdded: (callback: (event: { remoteChainSelector: bigint; remotePoolAddress: `0x${string}` }) => void, filter?: { remoteChainSelector?: bigint | bigint[] | null }) => {
|
|
3350
|
+
return this.publicClient.watchContractEvent({
|
|
3351
|
+
address: this.contractAddress,
|
|
3352
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3353
|
+
eventName: 'RemotePoolAdded',
|
|
3354
|
+
args: filter as any,
|
|
3355
|
+
onLogs: (logs: any[]) => {
|
|
3356
|
+
logs.forEach((log: any) => {
|
|
3357
|
+
callback(log.args as any);
|
|
3358
|
+
});
|
|
3359
|
+
},
|
|
3360
|
+
}) as () => void;
|
|
3361
|
+
},
|
|
3362
|
+
/**
|
|
3363
|
+
* Watch RemotePoolRemoved events
|
|
3364
|
+
* @param callback Function to call when event is emitted
|
|
3365
|
+
* @param filter Optional filter for indexed parameters
|
|
3366
|
+
* @returns Unwatch function to stop listening
|
|
3367
|
+
*/
|
|
3368
|
+
RemotePoolRemoved: (callback: (event: { remoteChainSelector: bigint; remotePoolAddress: `0x${string}` }) => void, filter?: { remoteChainSelector?: bigint | bigint[] | null }) => {
|
|
3369
|
+
return this.publicClient.watchContractEvent({
|
|
3370
|
+
address: this.contractAddress,
|
|
3371
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3372
|
+
eventName: 'RemotePoolRemoved',
|
|
3373
|
+
args: filter as any,
|
|
3374
|
+
onLogs: (logs: any[]) => {
|
|
3375
|
+
logs.forEach((log: any) => {
|
|
3376
|
+
callback(log.args as any);
|
|
3377
|
+
});
|
|
3378
|
+
},
|
|
3379
|
+
}) as () => void;
|
|
3380
|
+
},
|
|
3381
|
+
/**
|
|
3382
|
+
* Watch RouterUpdated events
|
|
3383
|
+
* @param callback Function to call when event is emitted
|
|
3384
|
+
* @param filter Optional filter for indexed parameters
|
|
3385
|
+
* @returns Unwatch function to stop listening
|
|
3386
|
+
*/
|
|
3387
|
+
RouterUpdated: (callback: (event: { oldRouter: `0x${string}`; newRouter: `0x${string}` }) => void) => {
|
|
3388
|
+
return this.publicClient.watchContractEvent({
|
|
3389
|
+
address: this.contractAddress,
|
|
3390
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3391
|
+
eventName: 'RouterUpdated',
|
|
3392
|
+
|
|
3393
|
+
onLogs: (logs: any[]) => {
|
|
3394
|
+
logs.forEach((log: any) => {
|
|
3395
|
+
callback(log.args as any);
|
|
3396
|
+
});
|
|
3397
|
+
},
|
|
3398
|
+
}) as () => void;
|
|
3399
|
+
},
|
|
3400
|
+
/**
|
|
3401
|
+
* Watch TokensConsumed events
|
|
3402
|
+
* @param callback Function to call when event is emitted
|
|
3403
|
+
* @param filter Optional filter for indexed parameters
|
|
3404
|
+
* @returns Unwatch function to stop listening
|
|
3405
|
+
*/
|
|
3406
|
+
TokensConsumed: (callback: (event: { tokens: bigint }) => void) => {
|
|
3407
|
+
return this.publicClient.watchContractEvent({
|
|
3408
|
+
address: this.contractAddress,
|
|
3409
|
+
abi: UpgradeableLockReleaseTokenPoolAbi,
|
|
3410
|
+
eventName: 'TokensConsumed',
|
|
3411
|
+
|
|
3412
|
+
onLogs: (logs: any[]) => {
|
|
3413
|
+
logs.forEach((log: any) => {
|
|
3414
|
+
callback(log.args as any);
|
|
3415
|
+
});
|
|
3416
|
+
},
|
|
3417
|
+
}) as () => void;
|
|
3418
|
+
}
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
}
|