@gitmyabi/pooladdressesprovider 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/PoolAddressesProvider.d.ts +1149 -0
- package/contracts/PoolAddressesProvider.js +1192 -0
- package/contracts/PoolAddressesProvider.ts +1505 -0
- package/contracts/index.d.ts +2 -0
- package/contracts/index.js +7 -0
- package/contracts/index.ts +3 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +40 -3
|
@@ -0,0 +1,1192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PoolAddressesProvider = exports.PoolAddressesProviderAbi = void 0;
|
|
4
|
+
const viem_1 = require("viem");
|
|
5
|
+
/**
|
|
6
|
+
* PoolAddressesProvider ABI
|
|
7
|
+
*
|
|
8
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
9
|
+
*/
|
|
10
|
+
exports.PoolAddressesProviderAbi = [
|
|
11
|
+
{
|
|
12
|
+
"inputs": [
|
|
13
|
+
{
|
|
14
|
+
"internalType": "string",
|
|
15
|
+
"name": "marketId",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"internalType": "address",
|
|
20
|
+
"name": "owner",
|
|
21
|
+
"type": "address"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"stateMutability": "nonpayable",
|
|
25
|
+
"type": "constructor"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"anonymous": false,
|
|
29
|
+
"inputs": [
|
|
30
|
+
{
|
|
31
|
+
"indexed": true,
|
|
32
|
+
"internalType": "address",
|
|
33
|
+
"name": "oldAddress",
|
|
34
|
+
"type": "address"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"indexed": true,
|
|
38
|
+
"internalType": "address",
|
|
39
|
+
"name": "newAddress",
|
|
40
|
+
"type": "address"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"name": "ACLAdminUpdated",
|
|
44
|
+
"type": "event"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"anonymous": false,
|
|
48
|
+
"inputs": [
|
|
49
|
+
{
|
|
50
|
+
"indexed": true,
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "oldAddress",
|
|
53
|
+
"type": "address"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"indexed": true,
|
|
57
|
+
"internalType": "address",
|
|
58
|
+
"name": "newAddress",
|
|
59
|
+
"type": "address"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"name": "ACLManagerUpdated",
|
|
63
|
+
"type": "event"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"anonymous": false,
|
|
67
|
+
"inputs": [
|
|
68
|
+
{
|
|
69
|
+
"indexed": true,
|
|
70
|
+
"internalType": "bytes32",
|
|
71
|
+
"name": "id",
|
|
72
|
+
"type": "bytes32"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"indexed": true,
|
|
76
|
+
"internalType": "address",
|
|
77
|
+
"name": "oldAddress",
|
|
78
|
+
"type": "address"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"indexed": true,
|
|
82
|
+
"internalType": "address",
|
|
83
|
+
"name": "newAddress",
|
|
84
|
+
"type": "address"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"name": "AddressSet",
|
|
88
|
+
"type": "event"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"anonymous": false,
|
|
92
|
+
"inputs": [
|
|
93
|
+
{
|
|
94
|
+
"indexed": true,
|
|
95
|
+
"internalType": "bytes32",
|
|
96
|
+
"name": "id",
|
|
97
|
+
"type": "bytes32"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"indexed": true,
|
|
101
|
+
"internalType": "address",
|
|
102
|
+
"name": "proxyAddress",
|
|
103
|
+
"type": "address"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"indexed": false,
|
|
107
|
+
"internalType": "address",
|
|
108
|
+
"name": "oldImplementationAddress",
|
|
109
|
+
"type": "address"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"indexed": true,
|
|
113
|
+
"internalType": "address",
|
|
114
|
+
"name": "newImplementationAddress",
|
|
115
|
+
"type": "address"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"name": "AddressSetAsProxy",
|
|
119
|
+
"type": "event"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"anonymous": false,
|
|
123
|
+
"inputs": [
|
|
124
|
+
{
|
|
125
|
+
"indexed": true,
|
|
126
|
+
"internalType": "string",
|
|
127
|
+
"name": "oldMarketId",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"indexed": true,
|
|
132
|
+
"internalType": "string",
|
|
133
|
+
"name": "newMarketId",
|
|
134
|
+
"type": "string"
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
"name": "MarketIdSet",
|
|
138
|
+
"type": "event"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"anonymous": false,
|
|
142
|
+
"inputs": [
|
|
143
|
+
{
|
|
144
|
+
"indexed": true,
|
|
145
|
+
"internalType": "address",
|
|
146
|
+
"name": "previousOwner",
|
|
147
|
+
"type": "address"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"indexed": true,
|
|
151
|
+
"internalType": "address",
|
|
152
|
+
"name": "newOwner",
|
|
153
|
+
"type": "address"
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
"name": "OwnershipTransferred",
|
|
157
|
+
"type": "event"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"anonymous": false,
|
|
161
|
+
"inputs": [
|
|
162
|
+
{
|
|
163
|
+
"indexed": true,
|
|
164
|
+
"internalType": "address",
|
|
165
|
+
"name": "oldAddress",
|
|
166
|
+
"type": "address"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"indexed": true,
|
|
170
|
+
"internalType": "address",
|
|
171
|
+
"name": "newAddress",
|
|
172
|
+
"type": "address"
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"name": "PoolConfiguratorUpdated",
|
|
176
|
+
"type": "event"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"anonymous": false,
|
|
180
|
+
"inputs": [
|
|
181
|
+
{
|
|
182
|
+
"indexed": true,
|
|
183
|
+
"internalType": "address",
|
|
184
|
+
"name": "oldAddress",
|
|
185
|
+
"type": "address"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"indexed": true,
|
|
189
|
+
"internalType": "address",
|
|
190
|
+
"name": "newAddress",
|
|
191
|
+
"type": "address"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"name": "PoolDataProviderUpdated",
|
|
195
|
+
"type": "event"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"anonymous": false,
|
|
199
|
+
"inputs": [
|
|
200
|
+
{
|
|
201
|
+
"indexed": true,
|
|
202
|
+
"internalType": "address",
|
|
203
|
+
"name": "oldAddress",
|
|
204
|
+
"type": "address"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"indexed": true,
|
|
208
|
+
"internalType": "address",
|
|
209
|
+
"name": "newAddress",
|
|
210
|
+
"type": "address"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"name": "PoolUpdated",
|
|
214
|
+
"type": "event"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"anonymous": false,
|
|
218
|
+
"inputs": [
|
|
219
|
+
{
|
|
220
|
+
"indexed": true,
|
|
221
|
+
"internalType": "address",
|
|
222
|
+
"name": "oldAddress",
|
|
223
|
+
"type": "address"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"indexed": true,
|
|
227
|
+
"internalType": "address",
|
|
228
|
+
"name": "newAddress",
|
|
229
|
+
"type": "address"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"name": "PriceOracleSentinelUpdated",
|
|
233
|
+
"type": "event"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"anonymous": false,
|
|
237
|
+
"inputs": [
|
|
238
|
+
{
|
|
239
|
+
"indexed": true,
|
|
240
|
+
"internalType": "address",
|
|
241
|
+
"name": "oldAddress",
|
|
242
|
+
"type": "address"
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"indexed": true,
|
|
246
|
+
"internalType": "address",
|
|
247
|
+
"name": "newAddress",
|
|
248
|
+
"type": "address"
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"name": "PriceOracleUpdated",
|
|
252
|
+
"type": "event"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"anonymous": false,
|
|
256
|
+
"inputs": [
|
|
257
|
+
{
|
|
258
|
+
"indexed": true,
|
|
259
|
+
"internalType": "bytes32",
|
|
260
|
+
"name": "id",
|
|
261
|
+
"type": "bytes32"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"indexed": true,
|
|
265
|
+
"internalType": "address",
|
|
266
|
+
"name": "proxyAddress",
|
|
267
|
+
"type": "address"
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"indexed": true,
|
|
271
|
+
"internalType": "address",
|
|
272
|
+
"name": "implementationAddress",
|
|
273
|
+
"type": "address"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"name": "ProxyCreated",
|
|
277
|
+
"type": "event"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [],
|
|
281
|
+
"name": "getACLAdmin",
|
|
282
|
+
"outputs": [
|
|
283
|
+
{
|
|
284
|
+
"internalType": "address",
|
|
285
|
+
"name": "",
|
|
286
|
+
"type": "address"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"stateMutability": "view",
|
|
290
|
+
"type": "function"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [],
|
|
294
|
+
"name": "getACLManager",
|
|
295
|
+
"outputs": [
|
|
296
|
+
{
|
|
297
|
+
"internalType": "address",
|
|
298
|
+
"name": "",
|
|
299
|
+
"type": "address"
|
|
300
|
+
}
|
|
301
|
+
],
|
|
302
|
+
"stateMutability": "view",
|
|
303
|
+
"type": "function"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"inputs": [
|
|
307
|
+
{
|
|
308
|
+
"internalType": "bytes32",
|
|
309
|
+
"name": "id",
|
|
310
|
+
"type": "bytes32"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"name": "getAddress",
|
|
314
|
+
"outputs": [
|
|
315
|
+
{
|
|
316
|
+
"internalType": "address",
|
|
317
|
+
"name": "",
|
|
318
|
+
"type": "address"
|
|
319
|
+
}
|
|
320
|
+
],
|
|
321
|
+
"stateMutability": "view",
|
|
322
|
+
"type": "function"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"inputs": [],
|
|
326
|
+
"name": "getMarketId",
|
|
327
|
+
"outputs": [
|
|
328
|
+
{
|
|
329
|
+
"internalType": "string",
|
|
330
|
+
"name": "",
|
|
331
|
+
"type": "string"
|
|
332
|
+
}
|
|
333
|
+
],
|
|
334
|
+
"stateMutability": "view",
|
|
335
|
+
"type": "function"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"inputs": [],
|
|
339
|
+
"name": "getPool",
|
|
340
|
+
"outputs": [
|
|
341
|
+
{
|
|
342
|
+
"internalType": "address",
|
|
343
|
+
"name": "",
|
|
344
|
+
"type": "address"
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"stateMutability": "view",
|
|
348
|
+
"type": "function"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"inputs": [],
|
|
352
|
+
"name": "getPoolConfigurator",
|
|
353
|
+
"outputs": [
|
|
354
|
+
{
|
|
355
|
+
"internalType": "address",
|
|
356
|
+
"name": "",
|
|
357
|
+
"type": "address"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
"stateMutability": "view",
|
|
361
|
+
"type": "function"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"inputs": [],
|
|
365
|
+
"name": "getPoolDataProvider",
|
|
366
|
+
"outputs": [
|
|
367
|
+
{
|
|
368
|
+
"internalType": "address",
|
|
369
|
+
"name": "",
|
|
370
|
+
"type": "address"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"stateMutability": "view",
|
|
374
|
+
"type": "function"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"inputs": [],
|
|
378
|
+
"name": "getPriceOracle",
|
|
379
|
+
"outputs": [
|
|
380
|
+
{
|
|
381
|
+
"internalType": "address",
|
|
382
|
+
"name": "",
|
|
383
|
+
"type": "address"
|
|
384
|
+
}
|
|
385
|
+
],
|
|
386
|
+
"stateMutability": "view",
|
|
387
|
+
"type": "function"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"inputs": [],
|
|
391
|
+
"name": "getPriceOracleSentinel",
|
|
392
|
+
"outputs": [
|
|
393
|
+
{
|
|
394
|
+
"internalType": "address",
|
|
395
|
+
"name": "",
|
|
396
|
+
"type": "address"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"stateMutability": "view",
|
|
400
|
+
"type": "function"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"inputs": [],
|
|
404
|
+
"name": "owner",
|
|
405
|
+
"outputs": [
|
|
406
|
+
{
|
|
407
|
+
"internalType": "address",
|
|
408
|
+
"name": "",
|
|
409
|
+
"type": "address"
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"stateMutability": "view",
|
|
413
|
+
"type": "function"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"inputs": [],
|
|
417
|
+
"name": "renounceOwnership",
|
|
418
|
+
"outputs": [],
|
|
419
|
+
"stateMutability": "nonpayable",
|
|
420
|
+
"type": "function"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"inputs": [
|
|
424
|
+
{
|
|
425
|
+
"internalType": "address",
|
|
426
|
+
"name": "newAclAdmin",
|
|
427
|
+
"type": "address"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"name": "setACLAdmin",
|
|
431
|
+
"outputs": [],
|
|
432
|
+
"stateMutability": "nonpayable",
|
|
433
|
+
"type": "function"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"inputs": [
|
|
437
|
+
{
|
|
438
|
+
"internalType": "address",
|
|
439
|
+
"name": "newAclManager",
|
|
440
|
+
"type": "address"
|
|
441
|
+
}
|
|
442
|
+
],
|
|
443
|
+
"name": "setACLManager",
|
|
444
|
+
"outputs": [],
|
|
445
|
+
"stateMutability": "nonpayable",
|
|
446
|
+
"type": "function"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"inputs": [
|
|
450
|
+
{
|
|
451
|
+
"internalType": "bytes32",
|
|
452
|
+
"name": "id",
|
|
453
|
+
"type": "bytes32"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"internalType": "address",
|
|
457
|
+
"name": "newAddress",
|
|
458
|
+
"type": "address"
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"name": "setAddress",
|
|
462
|
+
"outputs": [],
|
|
463
|
+
"stateMutability": "nonpayable",
|
|
464
|
+
"type": "function"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"inputs": [
|
|
468
|
+
{
|
|
469
|
+
"internalType": "bytes32",
|
|
470
|
+
"name": "id",
|
|
471
|
+
"type": "bytes32"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"internalType": "address",
|
|
475
|
+
"name": "newImplementationAddress",
|
|
476
|
+
"type": "address"
|
|
477
|
+
}
|
|
478
|
+
],
|
|
479
|
+
"name": "setAddressAsProxy",
|
|
480
|
+
"outputs": [],
|
|
481
|
+
"stateMutability": "nonpayable",
|
|
482
|
+
"type": "function"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"inputs": [
|
|
486
|
+
{
|
|
487
|
+
"internalType": "string",
|
|
488
|
+
"name": "newMarketId",
|
|
489
|
+
"type": "string"
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"name": "setMarketId",
|
|
493
|
+
"outputs": [],
|
|
494
|
+
"stateMutability": "nonpayable",
|
|
495
|
+
"type": "function"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"inputs": [
|
|
499
|
+
{
|
|
500
|
+
"internalType": "address",
|
|
501
|
+
"name": "newPoolConfiguratorImpl",
|
|
502
|
+
"type": "address"
|
|
503
|
+
}
|
|
504
|
+
],
|
|
505
|
+
"name": "setPoolConfiguratorImpl",
|
|
506
|
+
"outputs": [],
|
|
507
|
+
"stateMutability": "nonpayable",
|
|
508
|
+
"type": "function"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"inputs": [
|
|
512
|
+
{
|
|
513
|
+
"internalType": "address",
|
|
514
|
+
"name": "newDataProvider",
|
|
515
|
+
"type": "address"
|
|
516
|
+
}
|
|
517
|
+
],
|
|
518
|
+
"name": "setPoolDataProvider",
|
|
519
|
+
"outputs": [],
|
|
520
|
+
"stateMutability": "nonpayable",
|
|
521
|
+
"type": "function"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"inputs": [
|
|
525
|
+
{
|
|
526
|
+
"internalType": "address",
|
|
527
|
+
"name": "newPoolImpl",
|
|
528
|
+
"type": "address"
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"name": "setPoolImpl",
|
|
532
|
+
"outputs": [],
|
|
533
|
+
"stateMutability": "nonpayable",
|
|
534
|
+
"type": "function"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"inputs": [
|
|
538
|
+
{
|
|
539
|
+
"internalType": "address",
|
|
540
|
+
"name": "newPriceOracle",
|
|
541
|
+
"type": "address"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"name": "setPriceOracle",
|
|
545
|
+
"outputs": [],
|
|
546
|
+
"stateMutability": "nonpayable",
|
|
547
|
+
"type": "function"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
"inputs": [
|
|
551
|
+
{
|
|
552
|
+
"internalType": "address",
|
|
553
|
+
"name": "newPriceOracleSentinel",
|
|
554
|
+
"type": "address"
|
|
555
|
+
}
|
|
556
|
+
],
|
|
557
|
+
"name": "setPriceOracleSentinel",
|
|
558
|
+
"outputs": [],
|
|
559
|
+
"stateMutability": "nonpayable",
|
|
560
|
+
"type": "function"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"inputs": [
|
|
564
|
+
{
|
|
565
|
+
"internalType": "address",
|
|
566
|
+
"name": "newOwner",
|
|
567
|
+
"type": "address"
|
|
568
|
+
}
|
|
569
|
+
],
|
|
570
|
+
"name": "transferOwnership",
|
|
571
|
+
"outputs": [],
|
|
572
|
+
"stateMutability": "nonpayable",
|
|
573
|
+
"type": "function"
|
|
574
|
+
}
|
|
575
|
+
];
|
|
576
|
+
/**
|
|
577
|
+
* PoolAddressesProvider Contract Class
|
|
578
|
+
*
|
|
579
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
580
|
+
*
|
|
581
|
+
* @example
|
|
582
|
+
* ```typescript
|
|
583
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
584
|
+
* import { mainnet } from 'viem/chains';
|
|
585
|
+
* import { PoolAddressesProvider } from 'PoolAddressesProvider';
|
|
586
|
+
*
|
|
587
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
588
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
589
|
+
*
|
|
590
|
+
* const contract = new PoolAddressesProvider('0x...', { publicClient, walletClient });
|
|
591
|
+
*
|
|
592
|
+
* // Read functions
|
|
593
|
+
* const result = await contract.balanceOf('0x...');
|
|
594
|
+
*
|
|
595
|
+
* // Write functions
|
|
596
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
597
|
+
*
|
|
598
|
+
* // Simulate transactions (dry-run)
|
|
599
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
600
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
601
|
+
*
|
|
602
|
+
* // Watch events
|
|
603
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
604
|
+
* console.log('Transfer event:', event);
|
|
605
|
+
* });
|
|
606
|
+
* ```
|
|
607
|
+
*/
|
|
608
|
+
class PoolAddressesProvider {
|
|
609
|
+
constructor(address, clients) {
|
|
610
|
+
this.contractAddress = address;
|
|
611
|
+
this.publicClient = clients.publicClient;
|
|
612
|
+
this.contract = (0, viem_1.getContract)({
|
|
613
|
+
address,
|
|
614
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
615
|
+
client: {
|
|
616
|
+
public: clients.publicClient,
|
|
617
|
+
wallet: clients.walletClient,
|
|
618
|
+
},
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Get the contract address
|
|
623
|
+
*/
|
|
624
|
+
get address() {
|
|
625
|
+
return this.contractAddress;
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* Get the underlying viem contract instance.
|
|
629
|
+
*/
|
|
630
|
+
getContract() {
|
|
631
|
+
return this.contract;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* getACLAdmin
|
|
635
|
+
* view
|
|
636
|
+
*/
|
|
637
|
+
async getACLAdmin() {
|
|
638
|
+
return this.contract.read.getACLAdmin();
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* getACLManager
|
|
642
|
+
* view
|
|
643
|
+
*/
|
|
644
|
+
async getACLManager() {
|
|
645
|
+
return this.contract.read.getACLManager();
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* getAddress
|
|
649
|
+
* view
|
|
650
|
+
*/
|
|
651
|
+
async getAddress(id) {
|
|
652
|
+
return this.contract.read.getAddress([id]);
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* getMarketId
|
|
656
|
+
* view
|
|
657
|
+
*/
|
|
658
|
+
async getMarketId() {
|
|
659
|
+
return this.contract.read.getMarketId();
|
|
660
|
+
}
|
|
661
|
+
/**
|
|
662
|
+
* getPool
|
|
663
|
+
* view
|
|
664
|
+
*/
|
|
665
|
+
async getPool() {
|
|
666
|
+
return this.contract.read.getPool();
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* getPoolConfigurator
|
|
670
|
+
* view
|
|
671
|
+
*/
|
|
672
|
+
async getPoolConfigurator() {
|
|
673
|
+
return this.contract.read.getPoolConfigurator();
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* getPoolDataProvider
|
|
677
|
+
* view
|
|
678
|
+
*/
|
|
679
|
+
async getPoolDataProvider() {
|
|
680
|
+
return this.contract.read.getPoolDataProvider();
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* getPriceOracle
|
|
684
|
+
* view
|
|
685
|
+
*/
|
|
686
|
+
async getPriceOracle() {
|
|
687
|
+
return this.contract.read.getPriceOracle();
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* getPriceOracleSentinel
|
|
691
|
+
* view
|
|
692
|
+
*/
|
|
693
|
+
async getPriceOracleSentinel() {
|
|
694
|
+
return this.contract.read.getPriceOracleSentinel();
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* owner
|
|
698
|
+
* view
|
|
699
|
+
*/
|
|
700
|
+
async owner() {
|
|
701
|
+
return this.contract.read.owner();
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* renounceOwnership
|
|
705
|
+
* nonpayable
|
|
706
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
707
|
+
*/
|
|
708
|
+
async renounceOwnership(options) {
|
|
709
|
+
if (!this.contract.write) {
|
|
710
|
+
throw new Error('Wallet client is required for write operations');
|
|
711
|
+
}
|
|
712
|
+
return this.contract.write.renounceOwnership(options);
|
|
713
|
+
}
|
|
714
|
+
/**
|
|
715
|
+
* setACLAdmin
|
|
716
|
+
* nonpayable
|
|
717
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
718
|
+
*/
|
|
719
|
+
async setACLAdmin(newAclAdmin, options) {
|
|
720
|
+
if (!this.contract.write) {
|
|
721
|
+
throw new Error('Wallet client is required for write operations');
|
|
722
|
+
}
|
|
723
|
+
return this.contract.write.setACLAdmin([newAclAdmin], options);
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* setACLManager
|
|
727
|
+
* nonpayable
|
|
728
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
729
|
+
*/
|
|
730
|
+
async setACLManager(newAclManager, options) {
|
|
731
|
+
if (!this.contract.write) {
|
|
732
|
+
throw new Error('Wallet client is required for write operations');
|
|
733
|
+
}
|
|
734
|
+
return this.contract.write.setACLManager([newAclManager], options);
|
|
735
|
+
}
|
|
736
|
+
/**
|
|
737
|
+
* setAddress
|
|
738
|
+
* nonpayable
|
|
739
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
740
|
+
*/
|
|
741
|
+
async setAddress(id, newAddress, options) {
|
|
742
|
+
if (!this.contract.write) {
|
|
743
|
+
throw new Error('Wallet client is required for write operations');
|
|
744
|
+
}
|
|
745
|
+
return this.contract.write.setAddress([id, newAddress], options);
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* setAddressAsProxy
|
|
749
|
+
* nonpayable
|
|
750
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
751
|
+
*/
|
|
752
|
+
async setAddressAsProxy(id, newImplementationAddress, options) {
|
|
753
|
+
if (!this.contract.write) {
|
|
754
|
+
throw new Error('Wallet client is required for write operations');
|
|
755
|
+
}
|
|
756
|
+
return this.contract.write.setAddressAsProxy([id, newImplementationAddress], options);
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* setMarketId
|
|
760
|
+
* nonpayable
|
|
761
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
762
|
+
*/
|
|
763
|
+
async setMarketId(newMarketId, options) {
|
|
764
|
+
if (!this.contract.write) {
|
|
765
|
+
throw new Error('Wallet client is required for write operations');
|
|
766
|
+
}
|
|
767
|
+
return this.contract.write.setMarketId([newMarketId], options);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* setPoolConfiguratorImpl
|
|
771
|
+
* nonpayable
|
|
772
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
773
|
+
*/
|
|
774
|
+
async setPoolConfiguratorImpl(newPoolConfiguratorImpl, options) {
|
|
775
|
+
if (!this.contract.write) {
|
|
776
|
+
throw new Error('Wallet client is required for write operations');
|
|
777
|
+
}
|
|
778
|
+
return this.contract.write.setPoolConfiguratorImpl([newPoolConfiguratorImpl], options);
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* setPoolDataProvider
|
|
782
|
+
* nonpayable
|
|
783
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
784
|
+
*/
|
|
785
|
+
async setPoolDataProvider(newDataProvider, options) {
|
|
786
|
+
if (!this.contract.write) {
|
|
787
|
+
throw new Error('Wallet client is required for write operations');
|
|
788
|
+
}
|
|
789
|
+
return this.contract.write.setPoolDataProvider([newDataProvider], options);
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* setPoolImpl
|
|
793
|
+
* nonpayable
|
|
794
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
795
|
+
*/
|
|
796
|
+
async setPoolImpl(newPoolImpl, options) {
|
|
797
|
+
if (!this.contract.write) {
|
|
798
|
+
throw new Error('Wallet client is required for write operations');
|
|
799
|
+
}
|
|
800
|
+
return this.contract.write.setPoolImpl([newPoolImpl], options);
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* setPriceOracle
|
|
804
|
+
* nonpayable
|
|
805
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
806
|
+
*/
|
|
807
|
+
async setPriceOracle(newPriceOracle, options) {
|
|
808
|
+
if (!this.contract.write) {
|
|
809
|
+
throw new Error('Wallet client is required for write operations');
|
|
810
|
+
}
|
|
811
|
+
return this.contract.write.setPriceOracle([newPriceOracle], options);
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* setPriceOracleSentinel
|
|
815
|
+
* nonpayable
|
|
816
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
817
|
+
*/
|
|
818
|
+
async setPriceOracleSentinel(newPriceOracleSentinel, options) {
|
|
819
|
+
if (!this.contract.write) {
|
|
820
|
+
throw new Error('Wallet client is required for write operations');
|
|
821
|
+
}
|
|
822
|
+
return this.contract.write.setPriceOracleSentinel([newPriceOracleSentinel], options);
|
|
823
|
+
}
|
|
824
|
+
/**
|
|
825
|
+
* transferOwnership
|
|
826
|
+
* nonpayable
|
|
827
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
828
|
+
*/
|
|
829
|
+
async transferOwnership(newOwner, options) {
|
|
830
|
+
if (!this.contract.write) {
|
|
831
|
+
throw new Error('Wallet client is required for write operations');
|
|
832
|
+
}
|
|
833
|
+
return this.contract.write.transferOwnership([newOwner], options);
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
840
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
841
|
+
* console.log('Would succeed:', result.result);
|
|
842
|
+
*/
|
|
843
|
+
get simulate() {
|
|
844
|
+
const contract = this.contract;
|
|
845
|
+
if (!contract.simulate) {
|
|
846
|
+
throw new Error('Public client is required for simulation');
|
|
847
|
+
}
|
|
848
|
+
return {
|
|
849
|
+
/**
|
|
850
|
+
* Simulate renounceOwnership
|
|
851
|
+
* Returns gas estimate and result without sending transaction
|
|
852
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
853
|
+
*/
|
|
854
|
+
async renounceOwnership(options) {
|
|
855
|
+
return contract.simulate.renounceOwnership(options);
|
|
856
|
+
},
|
|
857
|
+
/**
|
|
858
|
+
* Simulate setACLAdmin
|
|
859
|
+
* Returns gas estimate and result without sending transaction
|
|
860
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
861
|
+
*/
|
|
862
|
+
async setACLAdmin(newAclAdmin, options) {
|
|
863
|
+
return contract.simulate.setACLAdmin([newAclAdmin], options);
|
|
864
|
+
},
|
|
865
|
+
/**
|
|
866
|
+
* Simulate setACLManager
|
|
867
|
+
* Returns gas estimate and result without sending transaction
|
|
868
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
869
|
+
*/
|
|
870
|
+
async setACLManager(newAclManager, options) {
|
|
871
|
+
return contract.simulate.setACLManager([newAclManager], options);
|
|
872
|
+
},
|
|
873
|
+
/**
|
|
874
|
+
* Simulate setAddress
|
|
875
|
+
* Returns gas estimate and result without sending transaction
|
|
876
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
877
|
+
*/
|
|
878
|
+
async setAddress(id, newAddress, options) {
|
|
879
|
+
return contract.simulate.setAddress([id, newAddress], options);
|
|
880
|
+
},
|
|
881
|
+
/**
|
|
882
|
+
* Simulate setAddressAsProxy
|
|
883
|
+
* Returns gas estimate and result without sending transaction
|
|
884
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
885
|
+
*/
|
|
886
|
+
async setAddressAsProxy(id, newImplementationAddress, options) {
|
|
887
|
+
return contract.simulate.setAddressAsProxy([id, newImplementationAddress], options);
|
|
888
|
+
},
|
|
889
|
+
/**
|
|
890
|
+
* Simulate setMarketId
|
|
891
|
+
* Returns gas estimate and result without sending transaction
|
|
892
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
893
|
+
*/
|
|
894
|
+
async setMarketId(newMarketId, options) {
|
|
895
|
+
return contract.simulate.setMarketId([newMarketId], options);
|
|
896
|
+
},
|
|
897
|
+
/**
|
|
898
|
+
* Simulate setPoolConfiguratorImpl
|
|
899
|
+
* Returns gas estimate and result without sending transaction
|
|
900
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
901
|
+
*/
|
|
902
|
+
async setPoolConfiguratorImpl(newPoolConfiguratorImpl, options) {
|
|
903
|
+
return contract.simulate.setPoolConfiguratorImpl([newPoolConfiguratorImpl], options);
|
|
904
|
+
},
|
|
905
|
+
/**
|
|
906
|
+
* Simulate setPoolDataProvider
|
|
907
|
+
* Returns gas estimate and result without sending transaction
|
|
908
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
909
|
+
*/
|
|
910
|
+
async setPoolDataProvider(newDataProvider, options) {
|
|
911
|
+
return contract.simulate.setPoolDataProvider([newDataProvider], options);
|
|
912
|
+
},
|
|
913
|
+
/**
|
|
914
|
+
* Simulate setPoolImpl
|
|
915
|
+
* Returns gas estimate and result without sending transaction
|
|
916
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
917
|
+
*/
|
|
918
|
+
async setPoolImpl(newPoolImpl, options) {
|
|
919
|
+
return contract.simulate.setPoolImpl([newPoolImpl], options);
|
|
920
|
+
},
|
|
921
|
+
/**
|
|
922
|
+
* Simulate setPriceOracle
|
|
923
|
+
* Returns gas estimate and result without sending transaction
|
|
924
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
925
|
+
*/
|
|
926
|
+
async setPriceOracle(newPriceOracle, options) {
|
|
927
|
+
return contract.simulate.setPriceOracle([newPriceOracle], options);
|
|
928
|
+
},
|
|
929
|
+
/**
|
|
930
|
+
* Simulate setPriceOracleSentinel
|
|
931
|
+
* Returns gas estimate and result without sending transaction
|
|
932
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
933
|
+
*/
|
|
934
|
+
async setPriceOracleSentinel(newPriceOracleSentinel, options) {
|
|
935
|
+
return contract.simulate.setPriceOracleSentinel([newPriceOracleSentinel], options);
|
|
936
|
+
},
|
|
937
|
+
/**
|
|
938
|
+
* Simulate transferOwnership
|
|
939
|
+
* Returns gas estimate and result without sending transaction
|
|
940
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
941
|
+
*/
|
|
942
|
+
async transferOwnership(newOwner, options) {
|
|
943
|
+
return contract.simulate.transferOwnership([newOwner], options);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Watch contract events
|
|
949
|
+
*
|
|
950
|
+
* @example
|
|
951
|
+
* // Watch all Transfer events
|
|
952
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
953
|
+
* console.log('Transfer:', event);
|
|
954
|
+
* });
|
|
955
|
+
*
|
|
956
|
+
* // Stop watching
|
|
957
|
+
* unwatch();
|
|
958
|
+
*/
|
|
959
|
+
get watch() {
|
|
960
|
+
return {
|
|
961
|
+
/**
|
|
962
|
+
* Watch ACLAdminUpdated events
|
|
963
|
+
* @param callback Function to call when event is emitted
|
|
964
|
+
* @param filter Optional filter for indexed parameters
|
|
965
|
+
* @returns Unwatch function to stop listening
|
|
966
|
+
*/
|
|
967
|
+
ACLAdminUpdated: (callback, filter) => {
|
|
968
|
+
return this.publicClient.watchContractEvent({
|
|
969
|
+
address: this.contractAddress,
|
|
970
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
971
|
+
eventName: 'ACLAdminUpdated',
|
|
972
|
+
args: filter,
|
|
973
|
+
onLogs: (logs) => {
|
|
974
|
+
logs.forEach((log) => {
|
|
975
|
+
callback(log.args);
|
|
976
|
+
});
|
|
977
|
+
},
|
|
978
|
+
});
|
|
979
|
+
},
|
|
980
|
+
/**
|
|
981
|
+
* Watch ACLManagerUpdated events
|
|
982
|
+
* @param callback Function to call when event is emitted
|
|
983
|
+
* @param filter Optional filter for indexed parameters
|
|
984
|
+
* @returns Unwatch function to stop listening
|
|
985
|
+
*/
|
|
986
|
+
ACLManagerUpdated: (callback, filter) => {
|
|
987
|
+
return this.publicClient.watchContractEvent({
|
|
988
|
+
address: this.contractAddress,
|
|
989
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
990
|
+
eventName: 'ACLManagerUpdated',
|
|
991
|
+
args: filter,
|
|
992
|
+
onLogs: (logs) => {
|
|
993
|
+
logs.forEach((log) => {
|
|
994
|
+
callback(log.args);
|
|
995
|
+
});
|
|
996
|
+
},
|
|
997
|
+
});
|
|
998
|
+
},
|
|
999
|
+
/**
|
|
1000
|
+
* Watch AddressSet events
|
|
1001
|
+
* @param callback Function to call when event is emitted
|
|
1002
|
+
* @param filter Optional filter for indexed parameters
|
|
1003
|
+
* @returns Unwatch function to stop listening
|
|
1004
|
+
*/
|
|
1005
|
+
AddressSet: (callback, filter) => {
|
|
1006
|
+
return this.publicClient.watchContractEvent({
|
|
1007
|
+
address: this.contractAddress,
|
|
1008
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1009
|
+
eventName: 'AddressSet',
|
|
1010
|
+
args: filter,
|
|
1011
|
+
onLogs: (logs) => {
|
|
1012
|
+
logs.forEach((log) => {
|
|
1013
|
+
callback(log.args);
|
|
1014
|
+
});
|
|
1015
|
+
},
|
|
1016
|
+
});
|
|
1017
|
+
},
|
|
1018
|
+
/**
|
|
1019
|
+
* Watch AddressSetAsProxy events
|
|
1020
|
+
* @param callback Function to call when event is emitted
|
|
1021
|
+
* @param filter Optional filter for indexed parameters
|
|
1022
|
+
* @returns Unwatch function to stop listening
|
|
1023
|
+
*/
|
|
1024
|
+
AddressSetAsProxy: (callback, filter) => {
|
|
1025
|
+
return this.publicClient.watchContractEvent({
|
|
1026
|
+
address: this.contractAddress,
|
|
1027
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1028
|
+
eventName: 'AddressSetAsProxy',
|
|
1029
|
+
args: filter,
|
|
1030
|
+
onLogs: (logs) => {
|
|
1031
|
+
logs.forEach((log) => {
|
|
1032
|
+
callback(log.args);
|
|
1033
|
+
});
|
|
1034
|
+
},
|
|
1035
|
+
});
|
|
1036
|
+
},
|
|
1037
|
+
/**
|
|
1038
|
+
* Watch MarketIdSet events
|
|
1039
|
+
* @param callback Function to call when event is emitted
|
|
1040
|
+
* @param filter Optional filter for indexed parameters
|
|
1041
|
+
* @returns Unwatch function to stop listening
|
|
1042
|
+
*/
|
|
1043
|
+
MarketIdSet: (callback, filter) => {
|
|
1044
|
+
return this.publicClient.watchContractEvent({
|
|
1045
|
+
address: this.contractAddress,
|
|
1046
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1047
|
+
eventName: 'MarketIdSet',
|
|
1048
|
+
args: filter,
|
|
1049
|
+
onLogs: (logs) => {
|
|
1050
|
+
logs.forEach((log) => {
|
|
1051
|
+
callback(log.args);
|
|
1052
|
+
});
|
|
1053
|
+
},
|
|
1054
|
+
});
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Watch OwnershipTransferred events
|
|
1058
|
+
* @param callback Function to call when event is emitted
|
|
1059
|
+
* @param filter Optional filter for indexed parameters
|
|
1060
|
+
* @returns Unwatch function to stop listening
|
|
1061
|
+
*/
|
|
1062
|
+
OwnershipTransferred: (callback, filter) => {
|
|
1063
|
+
return this.publicClient.watchContractEvent({
|
|
1064
|
+
address: this.contractAddress,
|
|
1065
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1066
|
+
eventName: 'OwnershipTransferred',
|
|
1067
|
+
args: filter,
|
|
1068
|
+
onLogs: (logs) => {
|
|
1069
|
+
logs.forEach((log) => {
|
|
1070
|
+
callback(log.args);
|
|
1071
|
+
});
|
|
1072
|
+
},
|
|
1073
|
+
});
|
|
1074
|
+
},
|
|
1075
|
+
/**
|
|
1076
|
+
* Watch PoolConfiguratorUpdated events
|
|
1077
|
+
* @param callback Function to call when event is emitted
|
|
1078
|
+
* @param filter Optional filter for indexed parameters
|
|
1079
|
+
* @returns Unwatch function to stop listening
|
|
1080
|
+
*/
|
|
1081
|
+
PoolConfiguratorUpdated: (callback, filter) => {
|
|
1082
|
+
return this.publicClient.watchContractEvent({
|
|
1083
|
+
address: this.contractAddress,
|
|
1084
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1085
|
+
eventName: 'PoolConfiguratorUpdated',
|
|
1086
|
+
args: filter,
|
|
1087
|
+
onLogs: (logs) => {
|
|
1088
|
+
logs.forEach((log) => {
|
|
1089
|
+
callback(log.args);
|
|
1090
|
+
});
|
|
1091
|
+
},
|
|
1092
|
+
});
|
|
1093
|
+
},
|
|
1094
|
+
/**
|
|
1095
|
+
* Watch PoolDataProviderUpdated events
|
|
1096
|
+
* @param callback Function to call when event is emitted
|
|
1097
|
+
* @param filter Optional filter for indexed parameters
|
|
1098
|
+
* @returns Unwatch function to stop listening
|
|
1099
|
+
*/
|
|
1100
|
+
PoolDataProviderUpdated: (callback, filter) => {
|
|
1101
|
+
return this.publicClient.watchContractEvent({
|
|
1102
|
+
address: this.contractAddress,
|
|
1103
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1104
|
+
eventName: 'PoolDataProviderUpdated',
|
|
1105
|
+
args: filter,
|
|
1106
|
+
onLogs: (logs) => {
|
|
1107
|
+
logs.forEach((log) => {
|
|
1108
|
+
callback(log.args);
|
|
1109
|
+
});
|
|
1110
|
+
},
|
|
1111
|
+
});
|
|
1112
|
+
},
|
|
1113
|
+
/**
|
|
1114
|
+
* Watch PoolUpdated events
|
|
1115
|
+
* @param callback Function to call when event is emitted
|
|
1116
|
+
* @param filter Optional filter for indexed parameters
|
|
1117
|
+
* @returns Unwatch function to stop listening
|
|
1118
|
+
*/
|
|
1119
|
+
PoolUpdated: (callback, filter) => {
|
|
1120
|
+
return this.publicClient.watchContractEvent({
|
|
1121
|
+
address: this.contractAddress,
|
|
1122
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1123
|
+
eventName: 'PoolUpdated',
|
|
1124
|
+
args: filter,
|
|
1125
|
+
onLogs: (logs) => {
|
|
1126
|
+
logs.forEach((log) => {
|
|
1127
|
+
callback(log.args);
|
|
1128
|
+
});
|
|
1129
|
+
},
|
|
1130
|
+
});
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
* Watch PriceOracleSentinelUpdated events
|
|
1134
|
+
* @param callback Function to call when event is emitted
|
|
1135
|
+
* @param filter Optional filter for indexed parameters
|
|
1136
|
+
* @returns Unwatch function to stop listening
|
|
1137
|
+
*/
|
|
1138
|
+
PriceOracleSentinelUpdated: (callback, filter) => {
|
|
1139
|
+
return this.publicClient.watchContractEvent({
|
|
1140
|
+
address: this.contractAddress,
|
|
1141
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1142
|
+
eventName: 'PriceOracleSentinelUpdated',
|
|
1143
|
+
args: filter,
|
|
1144
|
+
onLogs: (logs) => {
|
|
1145
|
+
logs.forEach((log) => {
|
|
1146
|
+
callback(log.args);
|
|
1147
|
+
});
|
|
1148
|
+
},
|
|
1149
|
+
});
|
|
1150
|
+
},
|
|
1151
|
+
/**
|
|
1152
|
+
* Watch PriceOracleUpdated events
|
|
1153
|
+
* @param callback Function to call when event is emitted
|
|
1154
|
+
* @param filter Optional filter for indexed parameters
|
|
1155
|
+
* @returns Unwatch function to stop listening
|
|
1156
|
+
*/
|
|
1157
|
+
PriceOracleUpdated: (callback, filter) => {
|
|
1158
|
+
return this.publicClient.watchContractEvent({
|
|
1159
|
+
address: this.contractAddress,
|
|
1160
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1161
|
+
eventName: 'PriceOracleUpdated',
|
|
1162
|
+
args: filter,
|
|
1163
|
+
onLogs: (logs) => {
|
|
1164
|
+
logs.forEach((log) => {
|
|
1165
|
+
callback(log.args);
|
|
1166
|
+
});
|
|
1167
|
+
},
|
|
1168
|
+
});
|
|
1169
|
+
},
|
|
1170
|
+
/**
|
|
1171
|
+
* Watch ProxyCreated events
|
|
1172
|
+
* @param callback Function to call when event is emitted
|
|
1173
|
+
* @param filter Optional filter for indexed parameters
|
|
1174
|
+
* @returns Unwatch function to stop listening
|
|
1175
|
+
*/
|
|
1176
|
+
ProxyCreated: (callback, filter) => {
|
|
1177
|
+
return this.publicClient.watchContractEvent({
|
|
1178
|
+
address: this.contractAddress,
|
|
1179
|
+
abi: exports.PoolAddressesProviderAbi,
|
|
1180
|
+
eventName: 'ProxyCreated',
|
|
1181
|
+
args: filter,
|
|
1182
|
+
onLogs: (logs) => {
|
|
1183
|
+
logs.forEach((log) => {
|
|
1184
|
+
callback(log.args);
|
|
1185
|
+
});
|
|
1186
|
+
},
|
|
1187
|
+
});
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
exports.PoolAddressesProvider = PoolAddressesProvider;
|