@gearbox-protocol/sdk 3.0.0 → 3.0.1-next.2
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/dist/cjs/abi/compressors.js +1124 -518
- package/dist/cjs/adapters/abi/adapters.js +123 -0
- package/dist/cjs/adapters/abi/index.js +1 -3
- package/dist/cjs/sdk/accounts/CreditAccountsService.js +2 -3
- package/dist/cjs/sdk/constants/address-provider.js +9 -15
- package/dist/cjs/sdk/market/MarketSuite.js +1 -1
- package/dist/cjs/sdk/market/credit/CreditFacadeV300Contract.js +1 -5
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +1 -5
- package/dist/cjs/sdk/market/oracle/PriceOracleBaseContract.js +6 -5
- package/dist/cjs/sdk/market/pool/PoolSuite.js +1 -1
- package/dist/cjs/sdk/market/pricefeeds/PriceFeedsRegister.js +4 -4
- package/dist/esm/abi/compressors.js +1124 -513
- package/dist/esm/adapters/abi/adapters.js +120 -0
- package/dist/esm/adapters/abi/index.js +0 -1
- package/dist/esm/sdk/accounts/CreditAccountsService.js +2 -3
- package/dist/esm/sdk/constants/address-provider.js +9 -13
- package/dist/esm/sdk/market/MarketSuite.js +1 -1
- package/dist/esm/sdk/market/credit/CreditFacadeV300Contract.js +1 -5
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +1 -5
- package/dist/esm/sdk/market/oracle/PriceOracleBaseContract.js +6 -5
- package/dist/esm/sdk/market/pool/PoolSuite.js +1 -1
- package/dist/esm/sdk/market/pricefeeds/PriceFeedsRegister.js +9 -6
- package/dist/types/abi/compressors.d.ts +1403 -775
- package/dist/types/adapters/BalancerV3RouterAdapterContract.d.ts +62 -104
- package/dist/types/adapters/abi/adapters.d.ts +213 -0
- package/dist/types/adapters/abi/index.d.ts +0 -1
- package/dist/types/sdk/accounts/types.d.ts +2 -2
- package/dist/types/sdk/base/types.d.ts +6 -6
- package/dist/types/sdk/constants/address-provider.d.ts +9 -11
- package/dist/types/sdk/market/oracle/PriceOracleBaseContract.d.ts +425 -85
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV300Contract.d.ts +2 -2
- package/dist/types/sdk/market/pool/PoolQuotaKeeperV310Contract.d.ts +2 -2
- package/dist/types/sdk/market/pool/createPoolQuotaKeeper.d.ts +2 -2
- package/dist/types/sdk/types/state-human.d.ts +1 -3
- package/package.json +1 -1
- package/dist/cjs/adapters/abi/iBalancerV3RouterAdapter.js +0 -153
- package/dist/esm/adapters/abi/iBalancerV3RouterAdapter.js +0 -129
- package/dist/types/adapters/abi/iBalancerV3RouterAdapter.d.ts +0 -230
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Abi, Address } from "viem";
|
|
1
|
+
import type { Abi, Address, ContractFunctionReturnType } from "viem";
|
|
2
|
+
import { iPriceFeedCompressorAbi } from "../../../abi/compressors.js";
|
|
2
3
|
import type { BaseContractOptions } from "../../base/BaseContract.js";
|
|
3
|
-
import type {
|
|
4
|
+
import type { PriceFeedTreeNode, PriceOracleData } from "../../base/index.js";
|
|
4
5
|
import { BaseContract } from "../../base/index.js";
|
|
5
6
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
6
7
|
import type { PriceOracleStateHuman } from "../../types/index.js";
|
|
@@ -118,37 +119,140 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
118
119
|
readonly name: "priceOracle";
|
|
119
120
|
readonly internalType: "address";
|
|
120
121
|
readonly type: "address";
|
|
121
|
-
}, {
|
|
122
|
-
readonly name: "tokens";
|
|
123
|
-
readonly internalType: "address[]";
|
|
124
|
-
readonly type: "address[]";
|
|
125
122
|
}];
|
|
126
|
-
readonly name: "
|
|
123
|
+
readonly name: "getPriceOracleState";
|
|
127
124
|
readonly outputs: readonly [{
|
|
128
|
-
readonly name: "
|
|
129
|
-
readonly internalType: "struct
|
|
130
|
-
readonly type: "tuple
|
|
125
|
+
readonly name: "";
|
|
126
|
+
readonly internalType: "struct PriceOracleState";
|
|
127
|
+
readonly type: "tuple";
|
|
131
128
|
readonly components: readonly [{
|
|
132
|
-
readonly name: "
|
|
133
|
-
readonly internalType: "
|
|
134
|
-
readonly type: "
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
129
|
+
readonly name: "baseParams";
|
|
130
|
+
readonly internalType: "struct BaseParams";
|
|
131
|
+
readonly type: "tuple";
|
|
132
|
+
readonly components: readonly [{
|
|
133
|
+
readonly name: "addr";
|
|
134
|
+
readonly internalType: "address";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "version";
|
|
138
|
+
readonly internalType: "uint256";
|
|
139
|
+
readonly type: "uint256";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "contractType";
|
|
142
|
+
readonly internalType: "bytes32";
|
|
143
|
+
readonly type: "bytes32";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "serializedParams";
|
|
146
|
+
readonly internalType: "bytes";
|
|
147
|
+
readonly type: "bytes";
|
|
148
|
+
}];
|
|
139
149
|
}, {
|
|
140
|
-
readonly name: "
|
|
141
|
-
readonly internalType: "
|
|
142
|
-
readonly type: "
|
|
150
|
+
readonly name: "priceFeedMap";
|
|
151
|
+
readonly internalType: "struct PriceFeedMapEntry[]";
|
|
152
|
+
readonly type: "tuple[]";
|
|
153
|
+
readonly components: readonly [{
|
|
154
|
+
readonly name: "token";
|
|
155
|
+
readonly internalType: "address";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "reserve";
|
|
159
|
+
readonly internalType: "bool";
|
|
160
|
+
readonly type: "bool";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "priceFeed";
|
|
163
|
+
readonly internalType: "address";
|
|
164
|
+
readonly type: "address";
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "stalenessPeriod";
|
|
167
|
+
readonly internalType: "uint32";
|
|
168
|
+
readonly type: "uint32";
|
|
169
|
+
}];
|
|
143
170
|
}, {
|
|
144
|
-
readonly name: "
|
|
145
|
-
readonly internalType: "
|
|
146
|
-
readonly type: "
|
|
171
|
+
readonly name: "priceFeedTree";
|
|
172
|
+
readonly internalType: "struct PriceFeedTreeNode[]";
|
|
173
|
+
readonly type: "tuple[]";
|
|
174
|
+
readonly components: readonly [{
|
|
175
|
+
readonly name: "baseParams";
|
|
176
|
+
readonly internalType: "struct BaseParams";
|
|
177
|
+
readonly type: "tuple";
|
|
178
|
+
readonly components: readonly [{
|
|
179
|
+
readonly name: "addr";
|
|
180
|
+
readonly internalType: "address";
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
}, {
|
|
183
|
+
readonly name: "version";
|
|
184
|
+
readonly internalType: "uint256";
|
|
185
|
+
readonly type: "uint256";
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "contractType";
|
|
188
|
+
readonly internalType: "bytes32";
|
|
189
|
+
readonly type: "bytes32";
|
|
190
|
+
}, {
|
|
191
|
+
readonly name: "serializedParams";
|
|
192
|
+
readonly internalType: "bytes";
|
|
193
|
+
readonly type: "bytes";
|
|
194
|
+
}];
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "description";
|
|
197
|
+
readonly internalType: "string";
|
|
198
|
+
readonly type: "string";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "decimals";
|
|
201
|
+
readonly internalType: "uint8";
|
|
202
|
+
readonly type: "uint8";
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "skipCheck";
|
|
205
|
+
readonly internalType: "bool";
|
|
206
|
+
readonly type: "bool";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "updatable";
|
|
209
|
+
readonly internalType: "bool";
|
|
210
|
+
readonly type: "bool";
|
|
211
|
+
}, {
|
|
212
|
+
readonly name: "underlyingFeeds";
|
|
213
|
+
readonly internalType: "address[]";
|
|
214
|
+
readonly type: "address[]";
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "underlyingStalenessPeriods";
|
|
217
|
+
readonly internalType: "uint32[]";
|
|
218
|
+
readonly type: "uint32[]";
|
|
219
|
+
}, {
|
|
220
|
+
readonly name: "answer";
|
|
221
|
+
readonly internalType: "struct PriceFeedAnswer";
|
|
222
|
+
readonly type: "tuple";
|
|
223
|
+
readonly components: readonly [{
|
|
224
|
+
readonly name: "price";
|
|
225
|
+
readonly internalType: "int256";
|
|
226
|
+
readonly type: "int256";
|
|
227
|
+
}, {
|
|
228
|
+
readonly name: "updatedAt";
|
|
229
|
+
readonly internalType: "uint256";
|
|
230
|
+
readonly type: "uint256";
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "success";
|
|
233
|
+
readonly internalType: "bool";
|
|
234
|
+
readonly type: "bool";
|
|
235
|
+
}];
|
|
236
|
+
}];
|
|
147
237
|
}];
|
|
238
|
+
}];
|
|
239
|
+
readonly stateMutability: "view";
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
readonly inputs: readonly [{
|
|
243
|
+
readonly name: "priceOracle";
|
|
244
|
+
readonly internalType: "address";
|
|
245
|
+
readonly type: "address";
|
|
148
246
|
}, {
|
|
149
|
-
readonly name: "
|
|
150
|
-
readonly internalType: "
|
|
151
|
-
readonly type: "
|
|
247
|
+
readonly name: "tokens";
|
|
248
|
+
readonly internalType: "address[]";
|
|
249
|
+
readonly type: "address[]";
|
|
250
|
+
}];
|
|
251
|
+
readonly name: "getPriceOracleState";
|
|
252
|
+
readonly outputs: readonly [{
|
|
253
|
+
readonly name: "";
|
|
254
|
+
readonly internalType: "struct PriceOracleState";
|
|
255
|
+
readonly type: "tuple";
|
|
152
256
|
readonly components: readonly [{
|
|
153
257
|
readonly name: "baseParams";
|
|
154
258
|
readonly internalType: "struct BaseParams";
|
|
@@ -171,45 +275,229 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
171
275
|
readonly type: "bytes";
|
|
172
276
|
}];
|
|
173
277
|
}, {
|
|
174
|
-
readonly name: "
|
|
175
|
-
readonly internalType: "
|
|
176
|
-
readonly type: "
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
278
|
+
readonly name: "priceFeedMap";
|
|
279
|
+
readonly internalType: "struct PriceFeedMapEntry[]";
|
|
280
|
+
readonly type: "tuple[]";
|
|
281
|
+
readonly components: readonly [{
|
|
282
|
+
readonly name: "token";
|
|
283
|
+
readonly internalType: "address";
|
|
284
|
+
readonly type: "address";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "reserve";
|
|
287
|
+
readonly internalType: "bool";
|
|
288
|
+
readonly type: "bool";
|
|
289
|
+
}, {
|
|
290
|
+
readonly name: "priceFeed";
|
|
291
|
+
readonly internalType: "address";
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
}, {
|
|
294
|
+
readonly name: "stalenessPeriod";
|
|
295
|
+
readonly internalType: "uint32";
|
|
296
|
+
readonly type: "uint32";
|
|
297
|
+
}];
|
|
189
298
|
}, {
|
|
190
|
-
readonly name: "
|
|
299
|
+
readonly name: "priceFeedTree";
|
|
300
|
+
readonly internalType: "struct PriceFeedTreeNode[]";
|
|
301
|
+
readonly type: "tuple[]";
|
|
302
|
+
readonly components: readonly [{
|
|
303
|
+
readonly name: "baseParams";
|
|
304
|
+
readonly internalType: "struct BaseParams";
|
|
305
|
+
readonly type: "tuple";
|
|
306
|
+
readonly components: readonly [{
|
|
307
|
+
readonly name: "addr";
|
|
308
|
+
readonly internalType: "address";
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
}, {
|
|
311
|
+
readonly name: "version";
|
|
312
|
+
readonly internalType: "uint256";
|
|
313
|
+
readonly type: "uint256";
|
|
314
|
+
}, {
|
|
315
|
+
readonly name: "contractType";
|
|
316
|
+
readonly internalType: "bytes32";
|
|
317
|
+
readonly type: "bytes32";
|
|
318
|
+
}, {
|
|
319
|
+
readonly name: "serializedParams";
|
|
320
|
+
readonly internalType: "bytes";
|
|
321
|
+
readonly type: "bytes";
|
|
322
|
+
}];
|
|
323
|
+
}, {
|
|
324
|
+
readonly name: "description";
|
|
325
|
+
readonly internalType: "string";
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "decimals";
|
|
329
|
+
readonly internalType: "uint8";
|
|
330
|
+
readonly type: "uint8";
|
|
331
|
+
}, {
|
|
332
|
+
readonly name: "skipCheck";
|
|
333
|
+
readonly internalType: "bool";
|
|
334
|
+
readonly type: "bool";
|
|
335
|
+
}, {
|
|
336
|
+
readonly name: "updatable";
|
|
337
|
+
readonly internalType: "bool";
|
|
338
|
+
readonly type: "bool";
|
|
339
|
+
}, {
|
|
340
|
+
readonly name: "underlyingFeeds";
|
|
341
|
+
readonly internalType: "address[]";
|
|
342
|
+
readonly type: "address[]";
|
|
343
|
+
}, {
|
|
344
|
+
readonly name: "underlyingStalenessPeriods";
|
|
345
|
+
readonly internalType: "uint32[]";
|
|
346
|
+
readonly type: "uint32[]";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "answer";
|
|
349
|
+
readonly internalType: "struct PriceFeedAnswer";
|
|
350
|
+
readonly type: "tuple";
|
|
351
|
+
readonly components: readonly [{
|
|
352
|
+
readonly name: "price";
|
|
353
|
+
readonly internalType: "int256";
|
|
354
|
+
readonly type: "int256";
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "updatedAt";
|
|
357
|
+
readonly internalType: "uint256";
|
|
358
|
+
readonly type: "uint256";
|
|
359
|
+
}, {
|
|
360
|
+
readonly name: "success";
|
|
361
|
+
readonly internalType: "bool";
|
|
362
|
+
readonly type: "bool";
|
|
363
|
+
}];
|
|
364
|
+
}];
|
|
365
|
+
}];
|
|
366
|
+
}];
|
|
367
|
+
readonly stateMutability: "view";
|
|
368
|
+
}, {
|
|
369
|
+
readonly type: "function";
|
|
370
|
+
readonly inputs: readonly [{
|
|
371
|
+
readonly name: "filter";
|
|
372
|
+
readonly internalType: "struct MarketFilter";
|
|
373
|
+
readonly type: "tuple";
|
|
374
|
+
readonly components: readonly [{
|
|
375
|
+
readonly name: "configurators";
|
|
191
376
|
readonly internalType: "address[]";
|
|
192
377
|
readonly type: "address[]";
|
|
193
378
|
}, {
|
|
194
|
-
readonly name: "
|
|
195
|
-
readonly internalType: "
|
|
196
|
-
readonly type: "
|
|
379
|
+
readonly name: "pools";
|
|
380
|
+
readonly internalType: "address[]";
|
|
381
|
+
readonly type: "address[]";
|
|
197
382
|
}, {
|
|
198
|
-
readonly name: "
|
|
199
|
-
readonly internalType: "
|
|
383
|
+
readonly name: "underlying";
|
|
384
|
+
readonly internalType: "address";
|
|
385
|
+
readonly type: "address";
|
|
386
|
+
}];
|
|
387
|
+
}];
|
|
388
|
+
readonly name: "getPriceOracles";
|
|
389
|
+
readonly outputs: readonly [{
|
|
390
|
+
readonly name: "";
|
|
391
|
+
readonly internalType: "struct PriceOracleState[]";
|
|
392
|
+
readonly type: "tuple[]";
|
|
393
|
+
readonly components: readonly [{
|
|
394
|
+
readonly name: "baseParams";
|
|
395
|
+
readonly internalType: "struct BaseParams";
|
|
200
396
|
readonly type: "tuple";
|
|
201
397
|
readonly components: readonly [{
|
|
202
|
-
readonly name: "
|
|
203
|
-
readonly internalType: "
|
|
204
|
-
readonly type: "
|
|
398
|
+
readonly name: "addr";
|
|
399
|
+
readonly internalType: "address";
|
|
400
|
+
readonly type: "address";
|
|
205
401
|
}, {
|
|
206
|
-
readonly name: "
|
|
402
|
+
readonly name: "version";
|
|
207
403
|
readonly internalType: "uint256";
|
|
208
404
|
readonly type: "uint256";
|
|
209
405
|
}, {
|
|
210
|
-
readonly name: "
|
|
406
|
+
readonly name: "contractType";
|
|
407
|
+
readonly internalType: "bytes32";
|
|
408
|
+
readonly type: "bytes32";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "serializedParams";
|
|
411
|
+
readonly internalType: "bytes";
|
|
412
|
+
readonly type: "bytes";
|
|
413
|
+
}];
|
|
414
|
+
}, {
|
|
415
|
+
readonly name: "priceFeedMap";
|
|
416
|
+
readonly internalType: "struct PriceFeedMapEntry[]";
|
|
417
|
+
readonly type: "tuple[]";
|
|
418
|
+
readonly components: readonly [{
|
|
419
|
+
readonly name: "token";
|
|
420
|
+
readonly internalType: "address";
|
|
421
|
+
readonly type: "address";
|
|
422
|
+
}, {
|
|
423
|
+
readonly name: "reserve";
|
|
424
|
+
readonly internalType: "bool";
|
|
425
|
+
readonly type: "bool";
|
|
426
|
+
}, {
|
|
427
|
+
readonly name: "priceFeed";
|
|
428
|
+
readonly internalType: "address";
|
|
429
|
+
readonly type: "address";
|
|
430
|
+
}, {
|
|
431
|
+
readonly name: "stalenessPeriod";
|
|
432
|
+
readonly internalType: "uint32";
|
|
433
|
+
readonly type: "uint32";
|
|
434
|
+
}];
|
|
435
|
+
}, {
|
|
436
|
+
readonly name: "priceFeedTree";
|
|
437
|
+
readonly internalType: "struct PriceFeedTreeNode[]";
|
|
438
|
+
readonly type: "tuple[]";
|
|
439
|
+
readonly components: readonly [{
|
|
440
|
+
readonly name: "baseParams";
|
|
441
|
+
readonly internalType: "struct BaseParams";
|
|
442
|
+
readonly type: "tuple";
|
|
443
|
+
readonly components: readonly [{
|
|
444
|
+
readonly name: "addr";
|
|
445
|
+
readonly internalType: "address";
|
|
446
|
+
readonly type: "address";
|
|
447
|
+
}, {
|
|
448
|
+
readonly name: "version";
|
|
449
|
+
readonly internalType: "uint256";
|
|
450
|
+
readonly type: "uint256";
|
|
451
|
+
}, {
|
|
452
|
+
readonly name: "contractType";
|
|
453
|
+
readonly internalType: "bytes32";
|
|
454
|
+
readonly type: "bytes32";
|
|
455
|
+
}, {
|
|
456
|
+
readonly name: "serializedParams";
|
|
457
|
+
readonly internalType: "bytes";
|
|
458
|
+
readonly type: "bytes";
|
|
459
|
+
}];
|
|
460
|
+
}, {
|
|
461
|
+
readonly name: "description";
|
|
462
|
+
readonly internalType: "string";
|
|
463
|
+
readonly type: "string";
|
|
464
|
+
}, {
|
|
465
|
+
readonly name: "decimals";
|
|
466
|
+
readonly internalType: "uint8";
|
|
467
|
+
readonly type: "uint8";
|
|
468
|
+
}, {
|
|
469
|
+
readonly name: "skipCheck";
|
|
211
470
|
readonly internalType: "bool";
|
|
212
471
|
readonly type: "bool";
|
|
472
|
+
}, {
|
|
473
|
+
readonly name: "updatable";
|
|
474
|
+
readonly internalType: "bool";
|
|
475
|
+
readonly type: "bool";
|
|
476
|
+
}, {
|
|
477
|
+
readonly name: "underlyingFeeds";
|
|
478
|
+
readonly internalType: "address[]";
|
|
479
|
+
readonly type: "address[]";
|
|
480
|
+
}, {
|
|
481
|
+
readonly name: "underlyingStalenessPeriods";
|
|
482
|
+
readonly internalType: "uint32[]";
|
|
483
|
+
readonly type: "uint32[]";
|
|
484
|
+
}, {
|
|
485
|
+
readonly name: "answer";
|
|
486
|
+
readonly internalType: "struct PriceFeedAnswer";
|
|
487
|
+
readonly type: "tuple";
|
|
488
|
+
readonly components: readonly [{
|
|
489
|
+
readonly name: "price";
|
|
490
|
+
readonly internalType: "int256";
|
|
491
|
+
readonly type: "int256";
|
|
492
|
+
}, {
|
|
493
|
+
readonly name: "updatedAt";
|
|
494
|
+
readonly internalType: "uint256";
|
|
495
|
+
readonly type: "uint256";
|
|
496
|
+
}, {
|
|
497
|
+
readonly name: "success";
|
|
498
|
+
readonly internalType: "bool";
|
|
499
|
+
readonly type: "bool";
|
|
500
|
+
}];
|
|
213
501
|
}];
|
|
214
502
|
}];
|
|
215
503
|
}];
|
|
@@ -217,34 +505,101 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
217
505
|
}, {
|
|
218
506
|
readonly type: "function";
|
|
219
507
|
readonly inputs: readonly [{
|
|
220
|
-
readonly name: "
|
|
221
|
-
readonly internalType: "address";
|
|
222
|
-
readonly type: "address";
|
|
508
|
+
readonly name: "priceFeeds";
|
|
509
|
+
readonly internalType: "address[]";
|
|
510
|
+
readonly type: "address[]";
|
|
223
511
|
}];
|
|
224
|
-
readonly name: "
|
|
512
|
+
readonly name: "getUpdatablePriceFeeds";
|
|
225
513
|
readonly outputs: readonly [{
|
|
226
|
-
readonly name: "
|
|
227
|
-
readonly internalType: "struct
|
|
514
|
+
readonly name: "";
|
|
515
|
+
readonly internalType: "struct BaseParams[]";
|
|
228
516
|
readonly type: "tuple[]";
|
|
229
517
|
readonly components: readonly [{
|
|
230
|
-
readonly name: "
|
|
518
|
+
readonly name: "addr";
|
|
231
519
|
readonly internalType: "address";
|
|
232
520
|
readonly type: "address";
|
|
233
521
|
}, {
|
|
234
|
-
readonly name: "
|
|
235
|
-
readonly internalType: "
|
|
236
|
-
readonly type: "
|
|
522
|
+
readonly name: "version";
|
|
523
|
+
readonly internalType: "uint256";
|
|
524
|
+
readonly type: "uint256";
|
|
525
|
+
}, {
|
|
526
|
+
readonly name: "contractType";
|
|
527
|
+
readonly internalType: "bytes32";
|
|
528
|
+
readonly type: "bytes32";
|
|
529
|
+
}, {
|
|
530
|
+
readonly name: "serializedParams";
|
|
531
|
+
readonly internalType: "bytes";
|
|
532
|
+
readonly type: "bytes";
|
|
533
|
+
}];
|
|
534
|
+
}];
|
|
535
|
+
readonly stateMutability: "view";
|
|
536
|
+
}, {
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
readonly inputs: readonly [{
|
|
539
|
+
readonly name: "filter";
|
|
540
|
+
readonly internalType: "struct MarketFilter";
|
|
541
|
+
readonly type: "tuple";
|
|
542
|
+
readonly components: readonly [{
|
|
543
|
+
readonly name: "configurators";
|
|
544
|
+
readonly internalType: "address[]";
|
|
545
|
+
readonly type: "address[]";
|
|
546
|
+
}, {
|
|
547
|
+
readonly name: "pools";
|
|
548
|
+
readonly internalType: "address[]";
|
|
549
|
+
readonly type: "address[]";
|
|
237
550
|
}, {
|
|
238
|
-
readonly name: "
|
|
551
|
+
readonly name: "underlying";
|
|
239
552
|
readonly internalType: "address";
|
|
240
553
|
readonly type: "address";
|
|
554
|
+
}];
|
|
555
|
+
}];
|
|
556
|
+
readonly name: "getUpdatablePriceFeeds";
|
|
557
|
+
readonly outputs: readonly [{
|
|
558
|
+
readonly name: "";
|
|
559
|
+
readonly internalType: "struct BaseParams[]";
|
|
560
|
+
readonly type: "tuple[]";
|
|
561
|
+
readonly components: readonly [{
|
|
562
|
+
readonly name: "addr";
|
|
563
|
+
readonly internalType: "address";
|
|
564
|
+
readonly type: "address";
|
|
565
|
+
}, {
|
|
566
|
+
readonly name: "version";
|
|
567
|
+
readonly internalType: "uint256";
|
|
568
|
+
readonly type: "uint256";
|
|
569
|
+
}, {
|
|
570
|
+
readonly name: "contractType";
|
|
571
|
+
readonly internalType: "bytes32";
|
|
572
|
+
readonly type: "bytes32";
|
|
241
573
|
}, {
|
|
242
|
-
readonly name: "
|
|
243
|
-
readonly internalType: "
|
|
244
|
-
readonly type: "
|
|
574
|
+
readonly name: "serializedParams";
|
|
575
|
+
readonly internalType: "bytes";
|
|
576
|
+
readonly type: "bytes";
|
|
245
577
|
}];
|
|
246
|
-
}
|
|
247
|
-
|
|
578
|
+
}];
|
|
579
|
+
readonly stateMutability: "view";
|
|
580
|
+
}, {
|
|
581
|
+
readonly type: "function";
|
|
582
|
+
readonly inputs: readonly [{
|
|
583
|
+
readonly name: "filter";
|
|
584
|
+
readonly internalType: "struct MarketFilter";
|
|
585
|
+
readonly type: "tuple";
|
|
586
|
+
readonly components: readonly [{
|
|
587
|
+
readonly name: "configurators";
|
|
588
|
+
readonly internalType: "address[]";
|
|
589
|
+
readonly type: "address[]";
|
|
590
|
+
}, {
|
|
591
|
+
readonly name: "pools";
|
|
592
|
+
readonly internalType: "address[]";
|
|
593
|
+
readonly type: "address[]";
|
|
594
|
+
}, {
|
|
595
|
+
readonly name: "underlying";
|
|
596
|
+
readonly internalType: "address";
|
|
597
|
+
readonly type: "address";
|
|
598
|
+
}];
|
|
599
|
+
}];
|
|
600
|
+
readonly name: "loadPriceFeedTree";
|
|
601
|
+
readonly outputs: readonly [{
|
|
602
|
+
readonly name: "";
|
|
248
603
|
readonly internalType: "struct PriceFeedTreeNode[]";
|
|
249
604
|
readonly type: "tuple[]";
|
|
250
605
|
readonly components: readonly [{
|
|
@@ -321,7 +676,7 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
321
676
|
}];
|
|
322
677
|
readonly name: "loadPriceFeedTree";
|
|
323
678
|
readonly outputs: readonly [{
|
|
324
|
-
readonly name: "
|
|
679
|
+
readonly name: "";
|
|
325
680
|
readonly internalType: "struct PriceFeedTreeNode[]";
|
|
326
681
|
readonly type: "tuple[]";
|
|
327
682
|
readonly components: readonly [{
|
|
@@ -399,27 +754,12 @@ export declare class PriceOracleBaseContract<abi extends Abi | readonly unknown[
|
|
|
399
754
|
readonly type: "uint256";
|
|
400
755
|
}];
|
|
401
756
|
readonly stateMutability: "view";
|
|
402
|
-
}, {
|
|
403
|
-
readonly type: "event";
|
|
404
|
-
readonly anonymous: false;
|
|
405
|
-
readonly inputs: readonly [{
|
|
406
|
-
readonly name: "contractType";
|
|
407
|
-
readonly internalType: "bytes32";
|
|
408
|
-
readonly type: "bytes32";
|
|
409
|
-
readonly indexed: true;
|
|
410
|
-
}, {
|
|
411
|
-
readonly name: "serializer";
|
|
412
|
-
readonly internalType: "address";
|
|
413
|
-
readonly type: "address";
|
|
414
|
-
readonly indexed: true;
|
|
415
|
-
}];
|
|
416
|
-
readonly name: "SetSerializer";
|
|
417
757
|
}];
|
|
418
758
|
address: `0x${string}`;
|
|
419
759
|
functionName: string;
|
|
420
760
|
args: any[];
|
|
421
761
|
};
|
|
422
|
-
onResult: (
|
|
762
|
+
onResult: (resp: ContractFunctionReturnType<typeof iPriceFeedCompressorAbi, "view", "getPriceOracleState">) => void;
|
|
423
763
|
};
|
|
424
764
|
/**
|
|
425
765
|
* Helper method to find "attachment point" of price feed (makes sense for updatable price feeds only) -
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract,
|
|
2
|
+
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
@@ -442,7 +442,7 @@ type abi = typeof abi;
|
|
|
442
442
|
export declare class PoolQuotaKeeperV300Contract extends BaseContract<abi> implements IBaseContract {
|
|
443
443
|
readonly decimals: number;
|
|
444
444
|
readonly quotas: AddressMap<QuotaState>;
|
|
445
|
-
constructor(sdk: GearboxSDK, pool: PoolState, pqk:
|
|
445
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
|
|
446
446
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
447
447
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
448
448
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ContractEventName, Log } from "viem";
|
|
2
|
-
import type { IBaseContract,
|
|
2
|
+
import type { IBaseContract, PoolState, QuotaKeeperState, QuotaState } from "../../base/index.js";
|
|
3
3
|
import { BaseContract } from "../../base/index.js";
|
|
4
4
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
5
5
|
import type { PoolQuotaKeeperStateHuman } from "../../types/index.js";
|
|
@@ -472,7 +472,7 @@ type abi = typeof abi;
|
|
|
472
472
|
export declare class PoolQuotaKeeperV310Contract extends BaseContract<abi> implements IBaseContract {
|
|
473
473
|
readonly decimals: number;
|
|
474
474
|
readonly quotas: AddressMap<QuotaState>;
|
|
475
|
-
constructor(sdk: GearboxSDK, pool: PoolState, pqk:
|
|
475
|
+
constructor(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState);
|
|
476
476
|
stateHuman(raw?: boolean): PoolQuotaKeeperStateHuman;
|
|
477
477
|
processLog(log: Log<bigint, number, false, undefined, undefined, abi, ContractEventName<abi>>): void;
|
|
478
478
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PoolState, QuotaKeeperState } from "../../base/index.js";
|
|
2
2
|
import type { GearboxSDK } from "../../GearboxSDK.js";
|
|
3
3
|
import type { PoolQuotaKeeperContract } from "./types.js";
|
|
4
|
-
export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool: PoolState, pqk:
|
|
4
|
+
export default function createPoolQuotaKeeper(sdk: GearboxSDK, pool: PoolState, pqk: QuotaKeeperState): PoolQuotaKeeperContract;
|
|
@@ -73,9 +73,7 @@ export interface CreditFacadeStateHuman extends BaseContractStateHuman {
|
|
|
73
73
|
botList: string;
|
|
74
74
|
minDebt: string;
|
|
75
75
|
maxDebt: string;
|
|
76
|
-
|
|
77
|
-
maxCumulativeLoss: string;
|
|
78
|
-
forbiddenTokenMask: string;
|
|
76
|
+
forbiddenTokensMask: string;
|
|
79
77
|
isPaused: boolean;
|
|
80
78
|
}
|
|
81
79
|
export interface CreditManagerStateHuman extends BaseContractStateHuman {
|