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