@gearbox-protocol/sdk 11.1.5 → 11.1.7

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.
@@ -19,10 +19,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  var errors_exports = {};
20
20
  __export(errors_exports, {
21
21
  errorAbis: () => errorAbis,
22
- iExceptionsAbi: () => iExceptionsAbi,
22
+ iExceptionsV300Abi: () => iExceptionsV300Abi,
23
+ iExceptionsV310Abi: () => iExceptionsV310Abi,
23
24
  iRedstoneErrorsAbi: () => iRedstoneErrorsAbi,
24
25
  iRedstonePriceFeedExceptionsAbi: () => iRedstonePriceFeedExceptionsAbi,
25
- iRouterV3ErrorsAbi: () => iRouterV3ErrorsAbi,
26
+ iRouterErrorsV300Abi: () => iRouterErrorsV300Abi,
27
+ iRouterErrorsV310Abi: () => iRouterErrorsV310Abi,
26
28
  ilpPriceFeedExceptionsAbi: () => ilpPriceFeedExceptionsAbi
27
29
  });
28
30
  module.exports = __toCommonJS(errors_exports);
@@ -40,7 +42,7 @@ const ilpPriceFeedExceptionsAbi = [
40
42
  { type: "error", inputs: [], name: "UpdateBoundsBeforeCooldownException" },
41
43
  { type: "error", inputs: [], name: "UpdateBoundsNotAllowedException" }
42
44
  ];
43
- const iRouterV3ErrorsAbi = [
45
+ const iRouterErrorsV300Abi = [
44
46
  {
45
47
  type: "error",
46
48
  inputs: [
@@ -69,7 +71,36 @@ const iRouterV3ErrorsAbi = [
69
71
  name: "UnsupportedRouterComponent"
70
72
  }
71
73
  ];
72
- const iExceptionsAbi = [
74
+ const iRouterErrorsV310Abi = [
75
+ {
76
+ type: "error",
77
+ name: "PathNotFoundException",
78
+ inputs: [
79
+ { name: "tokenIn", type: "address", internalType: "address" },
80
+ { name: "tokenOut", type: "address", internalType: "address" }
81
+ ]
82
+ },
83
+ {
84
+ type: "error",
85
+ name: "PathNotFoundExceptionTyped",
86
+ inputs: [
87
+ { name: "ttIn", type: "uint8", internalType: "uint8" },
88
+ { name: "tokenOut", type: "address", internalType: "address" }
89
+ ]
90
+ },
91
+ {
92
+ type: "error",
93
+ name: "PathToTargetNotFound",
94
+ inputs: [{ name: "tokenOut", type: "address", internalType: "address" }]
95
+ },
96
+ { type: "error", name: "UnsupportedAdapterType", inputs: [] },
97
+ {
98
+ type: "error",
99
+ name: "UnsupportedRouterComponent",
100
+ inputs: [{ name: "", type: "address", internalType: "address" }]
101
+ }
102
+ ];
103
+ const iExceptionsV300Abi = [
73
104
  { type: "error", inputs: [], name: "ActiveCreditAccountNotSetException" },
74
105
  { type: "error", inputs: [], name: "ActiveCreditAccountOverridenException" },
75
106
  { type: "error", inputs: [], name: "AdapterIsNotRegisteredException" },
@@ -210,19 +241,181 @@ const iRedstoneErrorsAbi = [
210
241
  name: "SignerNotAuthorised"
211
242
  }
212
243
  ];
244
+ const iExceptionsV310Abi = [
245
+ { type: "error", name: "ActiveCreditAccountNotSetException", inputs: [] },
246
+ { type: "error", name: "ActiveCreditAccountOverridenException", inputs: [] },
247
+ { type: "error", name: "AdapterIsNotRegisteredException", inputs: [] },
248
+ {
249
+ type: "error",
250
+ name: "AddressIsNotContractException",
251
+ inputs: [{ name: "", type: "address", internalType: "address" }]
252
+ },
253
+ { type: "error", name: "AddressNotFoundException", inputs: [] },
254
+ { type: "error", name: "AllowanceFailedException", inputs: [] },
255
+ { type: "error", name: "AmountCantBeZeroException", inputs: [] },
256
+ {
257
+ type: "error",
258
+ name: "BalanceLessThanExpectedException",
259
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
260
+ },
261
+ { type: "error", name: "BorrowAmountOutOfLimitsException", inputs: [] },
262
+ { type: "error", name: "BorrowedBlockLimitException", inputs: [] },
263
+ { type: "error", name: "BorrowingMoreThanU2ForbiddenException", inputs: [] },
264
+ { type: "error", name: "CallerNotAccountFactoryException", inputs: [] },
265
+ { type: "error", name: "CallerNotAdapterException", inputs: [] },
266
+ { type: "error", name: "CallerNotConfiguratorException", inputs: [] },
267
+ { type: "error", name: "CallerNotCreditAccountOwnerException", inputs: [] },
268
+ { type: "error", name: "CallerNotCreditFacadeException", inputs: [] },
269
+ { type: "error", name: "CallerNotCreditManagerException", inputs: [] },
270
+ { type: "error", name: "CallerNotExecutorException", inputs: [] },
271
+ { type: "error", name: "CallerNotGaugeException", inputs: [] },
272
+ { type: "error", name: "CallerNotMigratorException", inputs: [] },
273
+ { type: "error", name: "CallerNotPausableAdminException", inputs: [] },
274
+ { type: "error", name: "CallerNotPoolQuotaKeeperException", inputs: [] },
275
+ { type: "error", name: "CallerNotUnpausableAdminException", inputs: [] },
276
+ { type: "error", name: "CallerNotVetoAdminException", inputs: [] },
277
+ { type: "error", name: "CallerNotVoterException", inputs: [] },
278
+ { type: "error", name: "CloseAccountWithNonZeroDebtException", inputs: [] },
279
+ { type: "error", name: "CreditAccountDoesNotExistException", inputs: [] },
280
+ { type: "error", name: "CreditAccountIsInUseException", inputs: [] },
281
+ { type: "error", name: "CreditAccountNotLiquidatableException", inputs: [] },
282
+ {
283
+ type: "error",
284
+ name: "CreditAccountNotLiquidatableWithLossException",
285
+ inputs: []
286
+ },
287
+ { type: "error", name: "CreditManagerCantBorrowException", inputs: [] },
288
+ { type: "error", name: "CustomHealthFactorTooLowException", inputs: [] },
289
+ { type: "error", name: "DebtToZeroWithActiveQuotasException", inputs: [] },
290
+ { type: "error", name: "DebtUpdatedTwiceInOneBlockException", inputs: [] },
291
+ { type: "error", name: "ExpectedBalancesAlreadySetException", inputs: [] },
292
+ { type: "error", name: "ExpectedBalancesNotSetException", inputs: [] },
293
+ { type: "error", name: "ForbiddenInWhitelistedModeException", inputs: [] },
294
+ {
295
+ type: "error",
296
+ name: "ForbiddenTokenBalanceIncreasedException",
297
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
298
+ },
299
+ {
300
+ type: "error",
301
+ name: "ForbiddenTokenQuotaIncreasedException",
302
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
303
+ },
304
+ {
305
+ type: "error",
306
+ name: "ForbiddenTokensException",
307
+ inputs: [
308
+ { name: "forbiddenTokensMask", type: "uint256", internalType: "uint256" }
309
+ ]
310
+ },
311
+ { type: "error", name: "IncompatibleContractException", inputs: [] },
312
+ { type: "error", name: "IncompatibleCreditManagerException", inputs: [] },
313
+ { type: "error", name: "IncompatibleGaugeException", inputs: [] },
314
+ { type: "error", name: "IncompatiblePoolQuotaKeeperException", inputs: [] },
315
+ { type: "error", name: "IncompatibleSuccessorException", inputs: [] },
316
+ {
317
+ type: "error",
318
+ name: "InconsistentExpiredLiquidationFeesException",
319
+ inputs: []
320
+ },
321
+ { type: "error", name: "InconsistentLiquidationFeesException", inputs: [] },
322
+ { type: "error", name: "IncorrectAdaptersSetException", inputs: [] },
323
+ { type: "error", name: "IncorrectBotPermissionsException", inputs: [] },
324
+ { type: "error", name: "IncorrectExpirationDateException", inputs: [] },
325
+ { type: "error", name: "IncorrectLimitsException", inputs: [] },
326
+ { type: "error", name: "IncorrectLiquidationThresholdException", inputs: [] },
327
+ { type: "error", name: "IncorrectParameterException", inputs: [] },
328
+ { type: "error", name: "IncorrectPriceException", inputs: [] },
329
+ { type: "error", name: "IncorrectPriceFeedException", inputs: [] },
330
+ { type: "error", name: "IncorrectTokenContractException", inputs: [] },
331
+ { type: "error", name: "InsufficientBalanceException", inputs: [] },
332
+ { type: "error", name: "InsufficientRemainingFundsException", inputs: [] },
333
+ { type: "error", name: "InsufficientVotesException", inputs: [] },
334
+ { type: "error", name: "InvalidBotException", inputs: [] },
335
+ {
336
+ type: "error",
337
+ name: "InvalidCollateralHintException",
338
+ inputs: [{ name: "mask", type: "uint256", internalType: "uint256" }]
339
+ },
340
+ {
341
+ type: "error",
342
+ name: "MasterCreditAccountAlreadyDeployedException",
343
+ inputs: []
344
+ },
345
+ {
346
+ type: "error",
347
+ name: "NoPermissionException",
348
+ inputs: [{ name: "permission", type: "uint256", internalType: "uint256" }]
349
+ },
350
+ { type: "error", name: "NotAllowedAfterExpirationException", inputs: [] },
351
+ { type: "error", name: "NotAllowedWhenNotExpirableException", inputs: [] },
352
+ {
353
+ type: "error",
354
+ name: "NotApprovedBotException",
355
+ inputs: [{ name: "bot", type: "address", internalType: "address" }]
356
+ },
357
+ { type: "error", name: "NotEnoughCollateralException", inputs: [] },
358
+ { type: "error", name: "NotImplementedException", inputs: [] },
359
+ { type: "error", name: "PriceFeedDoesNotExistException", inputs: [] },
360
+ { type: "error", name: "PriceFeedIsNotUpdatableException", inputs: [] },
361
+ { type: "error", name: "QuotaIsOutOfBoundsException", inputs: [] },
362
+ { type: "error", name: "RampDurationTooShortException", inputs: [] },
363
+ { type: "error", name: "ReceiveIsNotAllowedException", inputs: [] },
364
+ { type: "error", name: "RegisteredCreditManagerOnlyException", inputs: [] },
365
+ { type: "error", name: "RegisteredPoolOnlyException", inputs: [] },
366
+ {
367
+ type: "error",
368
+ name: "RemainingTokenBalanceIncreasedException",
369
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
370
+ },
371
+ {
372
+ type: "error",
373
+ name: "SeizedLessThanRequiredException",
374
+ inputs: [
375
+ { name: "seizedAmount", type: "uint256", internalType: "uint256" }
376
+ ]
377
+ },
378
+ { type: "error", name: "StalePriceException", inputs: [] },
379
+ { type: "error", name: "TargetContractNotAllowedException", inputs: [] },
380
+ { type: "error", name: "TokenAlreadyAddedException", inputs: [] },
381
+ { type: "error", name: "TokenIsNotQuotedException", inputs: [] },
382
+ { type: "error", name: "TokenNotAllowedException", inputs: [] },
383
+ { type: "error", name: "TooManyActiveBotsException", inputs: [] },
384
+ { type: "error", name: "TooManyEnabledTokensException", inputs: [] },
385
+ { type: "error", name: "TooManyTokensException", inputs: [] },
386
+ { type: "error", name: "UnderlyingIsNotLiquidatableException", inputs: [] },
387
+ {
388
+ type: "error",
389
+ name: "UnexpectedPermissionsException",
390
+ inputs: [{ name: "permissions", type: "uint256", internalType: "uint256" }]
391
+ },
392
+ {
393
+ type: "error",
394
+ name: "UnknownMethodException",
395
+ inputs: [{ name: "selector", type: "bytes4", internalType: "bytes4" }]
396
+ },
397
+ { type: "error", name: "UpdateQuotaOnZeroDebtAccountException", inputs: [] },
398
+ { type: "error", name: "ValueOutOfRangeException", inputs: [] },
399
+ { type: "error", name: "VotingContractNotAllowedException", inputs: [] },
400
+ { type: "error", name: "ZeroAddressException", inputs: [] }
401
+ ];
213
402
  const errorAbis = [
214
- ...iExceptionsAbi,
403
+ ...iExceptionsV300Abi,
404
+ ...iExceptionsV310Abi,
215
405
  ...iRedstonePriceFeedExceptionsAbi,
216
406
  ...iRedstoneErrorsAbi,
217
407
  ...ilpPriceFeedExceptionsAbi,
218
- ...iRouterV3ErrorsAbi
408
+ ...iRouterErrorsV300Abi,
409
+ ...iRouterErrorsV310Abi
219
410
  ];
220
411
  // Annotate the CommonJS export names for ESM import in node:
221
412
  0 && (module.exports = {
222
413
  errorAbis,
223
- iExceptionsAbi,
414
+ iExceptionsV300Abi,
415
+ iExceptionsV310Abi,
224
416
  iRedstoneErrorsAbi,
225
417
  iRedstonePriceFeedExceptionsAbi,
226
- iRouterV3ErrorsAbi,
418
+ iRouterErrorsV300Abi,
419
+ iRouterErrorsV310Abi,
227
420
  ilpPriceFeedExceptionsAbi
228
421
  });
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var iDegenDistributor_exports = {};
20
- __export(iDegenDistributor_exports, {
21
- iDegenDistributorAbi: () => iDegenDistributorAbi
19
+ var iDegenDistributorV300_exports = {};
20
+ __export(iDegenDistributorV300_exports, {
21
+ iDegenDistributorV300Abi: () => iDegenDistributorV300Abi
22
22
  });
23
- module.exports = __toCommonJS(iDegenDistributor_exports);
24
- const iDegenDistributorAbi = [
23
+ module.exports = __toCommonJS(iDegenDistributorV300_exports);
24
+ const iDegenDistributorV300Abi = [
25
25
  {
26
26
  type: "function",
27
27
  inputs: [
@@ -41,6 +41,13 @@ const iDegenDistributorAbi = [
41
41
  outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
42
42
  stateMutability: "view"
43
43
  },
44
+ {
45
+ type: "function",
46
+ inputs: [],
47
+ name: "degenNFT",
48
+ outputs: [{ name: "", internalType: "address", type: "address" }],
49
+ stateMutability: "view"
50
+ },
44
51
  {
45
52
  type: "function",
46
53
  inputs: [],
@@ -89,5 +96,5 @@ const iDegenDistributorAbi = [
89
96
  ];
90
97
  // Annotate the CommonJS export names for ESM import in node:
91
98
  0 && (module.exports = {
92
- iDegenDistributorAbi
99
+ iDegenDistributorV300Abi
93
100
  });
@@ -151,7 +151,12 @@ class BytecodeRepositoryContract extends import_base_contract.BaseContract {
151
151
  if (code === void 0 || code === "0x") {
152
152
  return [];
153
153
  }
154
- const publicDomains = await this.contract.read.getPublicDomains();
154
+ let publicDomains = [];
155
+ try {
156
+ publicDomains = await this.contract.read.getPublicDomains();
157
+ } catch {
158
+ publicDomains = [];
159
+ }
155
160
  const publicDomainsString = publicDomains.map(
156
161
  (domain) => (0, import_viem.hexToString)(domain, { size: 32 })
157
162
  );
@@ -35,12 +35,18 @@ class ArchiveTransport {
35
35
  enableLogging: false,
36
36
  ...config
37
37
  };
38
- this.primaryTransport = (0, import_viem.http)(this.config.primaryRpcUrl, {
38
+ if (!config.primaryRpcUrl && !config.primaryTransport) {
39
+ throw new Error("primaryRpcUrl or primaryTransport are required");
40
+ }
41
+ if (!config.archiveRpcUrl && !config.archiveTransport) {
42
+ throw new Error("archiveRpcUrl or archiveTransport are required");
43
+ }
44
+ this.primaryTransport = config.primaryTransport ?? (0, import_viem.http)(config.primaryRpcUrl, {
39
45
  retryCount: this.config.retryCount,
40
46
  retryDelay: this.config.retryDelay,
41
47
  timeout: this.config.timeout
42
48
  });
43
- this.archiveTransport = (0, import_viem.http)(this.config.archiveRpcUrl, {
49
+ this.archiveTransport = config.archiveTransport ?? (0, import_viem.http)(config.archiveRpcUrl, {
44
50
  retryCount: this.config.retryCount,
45
51
  retryDelay: this.config.retryDelay,
46
52
  timeout: this.config.timeout
@@ -240,27 +246,6 @@ class ArchiveTransport {
240
246
  getConfig() {
241
247
  return { ...this.config };
242
248
  }
243
- /**
244
- * Update configuration (will invalidate cached transport)
245
- */
246
- updateConfig(updates) {
247
- this.config = { ...this.config, ...updates };
248
- this.cachedTransport = void 0;
249
- if (updates.primaryRpcUrl) {
250
- this.primaryTransport = (0, import_viem.http)(this.config.primaryRpcUrl, {
251
- retryCount: this.config.retryCount,
252
- retryDelay: this.config.retryDelay,
253
- timeout: this.config.timeout
254
- });
255
- }
256
- if (updates.archiveRpcUrl) {
257
- this.archiveTransport = (0, import_viem.http)(this.config.archiveRpcUrl, {
258
- retryCount: this.config.retryCount,
259
- retryDelay: this.config.retryDelay,
260
- timeout: this.config.timeout
261
- });
262
- }
263
- }
264
249
  /**
265
250
  * Enable or disable logging
266
251
  */
@@ -12,7 +12,7 @@ const ilpPriceFeedExceptionsAbi = [
12
12
  { type: "error", inputs: [], name: "UpdateBoundsBeforeCooldownException" },
13
13
  { type: "error", inputs: [], name: "UpdateBoundsNotAllowedException" }
14
14
  ];
15
- const iRouterV3ErrorsAbi = [
15
+ const iRouterErrorsV300Abi = [
16
16
  {
17
17
  type: "error",
18
18
  inputs: [
@@ -41,7 +41,36 @@ const iRouterV3ErrorsAbi = [
41
41
  name: "UnsupportedRouterComponent"
42
42
  }
43
43
  ];
44
- const iExceptionsAbi = [
44
+ const iRouterErrorsV310Abi = [
45
+ {
46
+ type: "error",
47
+ name: "PathNotFoundException",
48
+ inputs: [
49
+ { name: "tokenIn", type: "address", internalType: "address" },
50
+ { name: "tokenOut", type: "address", internalType: "address" }
51
+ ]
52
+ },
53
+ {
54
+ type: "error",
55
+ name: "PathNotFoundExceptionTyped",
56
+ inputs: [
57
+ { name: "ttIn", type: "uint8", internalType: "uint8" },
58
+ { name: "tokenOut", type: "address", internalType: "address" }
59
+ ]
60
+ },
61
+ {
62
+ type: "error",
63
+ name: "PathToTargetNotFound",
64
+ inputs: [{ name: "tokenOut", type: "address", internalType: "address" }]
65
+ },
66
+ { type: "error", name: "UnsupportedAdapterType", inputs: [] },
67
+ {
68
+ type: "error",
69
+ name: "UnsupportedRouterComponent",
70
+ inputs: [{ name: "", type: "address", internalType: "address" }]
71
+ }
72
+ ];
73
+ const iExceptionsV300Abi = [
45
74
  { type: "error", inputs: [], name: "ActiveCreditAccountNotSetException" },
46
75
  { type: "error", inputs: [], name: "ActiveCreditAccountOverridenException" },
47
76
  { type: "error", inputs: [], name: "AdapterIsNotRegisteredException" },
@@ -182,18 +211,180 @@ const iRedstoneErrorsAbi = [
182
211
  name: "SignerNotAuthorised"
183
212
  }
184
213
  ];
214
+ const iExceptionsV310Abi = [
215
+ { type: "error", name: "ActiveCreditAccountNotSetException", inputs: [] },
216
+ { type: "error", name: "ActiveCreditAccountOverridenException", inputs: [] },
217
+ { type: "error", name: "AdapterIsNotRegisteredException", inputs: [] },
218
+ {
219
+ type: "error",
220
+ name: "AddressIsNotContractException",
221
+ inputs: [{ name: "", type: "address", internalType: "address" }]
222
+ },
223
+ { type: "error", name: "AddressNotFoundException", inputs: [] },
224
+ { type: "error", name: "AllowanceFailedException", inputs: [] },
225
+ { type: "error", name: "AmountCantBeZeroException", inputs: [] },
226
+ {
227
+ type: "error",
228
+ name: "BalanceLessThanExpectedException",
229
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
230
+ },
231
+ { type: "error", name: "BorrowAmountOutOfLimitsException", inputs: [] },
232
+ { type: "error", name: "BorrowedBlockLimitException", inputs: [] },
233
+ { type: "error", name: "BorrowingMoreThanU2ForbiddenException", inputs: [] },
234
+ { type: "error", name: "CallerNotAccountFactoryException", inputs: [] },
235
+ { type: "error", name: "CallerNotAdapterException", inputs: [] },
236
+ { type: "error", name: "CallerNotConfiguratorException", inputs: [] },
237
+ { type: "error", name: "CallerNotCreditAccountOwnerException", inputs: [] },
238
+ { type: "error", name: "CallerNotCreditFacadeException", inputs: [] },
239
+ { type: "error", name: "CallerNotCreditManagerException", inputs: [] },
240
+ { type: "error", name: "CallerNotExecutorException", inputs: [] },
241
+ { type: "error", name: "CallerNotGaugeException", inputs: [] },
242
+ { type: "error", name: "CallerNotMigratorException", inputs: [] },
243
+ { type: "error", name: "CallerNotPausableAdminException", inputs: [] },
244
+ { type: "error", name: "CallerNotPoolQuotaKeeperException", inputs: [] },
245
+ { type: "error", name: "CallerNotUnpausableAdminException", inputs: [] },
246
+ { type: "error", name: "CallerNotVetoAdminException", inputs: [] },
247
+ { type: "error", name: "CallerNotVoterException", inputs: [] },
248
+ { type: "error", name: "CloseAccountWithNonZeroDebtException", inputs: [] },
249
+ { type: "error", name: "CreditAccountDoesNotExistException", inputs: [] },
250
+ { type: "error", name: "CreditAccountIsInUseException", inputs: [] },
251
+ { type: "error", name: "CreditAccountNotLiquidatableException", inputs: [] },
252
+ {
253
+ type: "error",
254
+ name: "CreditAccountNotLiquidatableWithLossException",
255
+ inputs: []
256
+ },
257
+ { type: "error", name: "CreditManagerCantBorrowException", inputs: [] },
258
+ { type: "error", name: "CustomHealthFactorTooLowException", inputs: [] },
259
+ { type: "error", name: "DebtToZeroWithActiveQuotasException", inputs: [] },
260
+ { type: "error", name: "DebtUpdatedTwiceInOneBlockException", inputs: [] },
261
+ { type: "error", name: "ExpectedBalancesAlreadySetException", inputs: [] },
262
+ { type: "error", name: "ExpectedBalancesNotSetException", inputs: [] },
263
+ { type: "error", name: "ForbiddenInWhitelistedModeException", inputs: [] },
264
+ {
265
+ type: "error",
266
+ name: "ForbiddenTokenBalanceIncreasedException",
267
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
268
+ },
269
+ {
270
+ type: "error",
271
+ name: "ForbiddenTokenQuotaIncreasedException",
272
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
273
+ },
274
+ {
275
+ type: "error",
276
+ name: "ForbiddenTokensException",
277
+ inputs: [
278
+ { name: "forbiddenTokensMask", type: "uint256", internalType: "uint256" }
279
+ ]
280
+ },
281
+ { type: "error", name: "IncompatibleContractException", inputs: [] },
282
+ { type: "error", name: "IncompatibleCreditManagerException", inputs: [] },
283
+ { type: "error", name: "IncompatibleGaugeException", inputs: [] },
284
+ { type: "error", name: "IncompatiblePoolQuotaKeeperException", inputs: [] },
285
+ { type: "error", name: "IncompatibleSuccessorException", inputs: [] },
286
+ {
287
+ type: "error",
288
+ name: "InconsistentExpiredLiquidationFeesException",
289
+ inputs: []
290
+ },
291
+ { type: "error", name: "InconsistentLiquidationFeesException", inputs: [] },
292
+ { type: "error", name: "IncorrectAdaptersSetException", inputs: [] },
293
+ { type: "error", name: "IncorrectBotPermissionsException", inputs: [] },
294
+ { type: "error", name: "IncorrectExpirationDateException", inputs: [] },
295
+ { type: "error", name: "IncorrectLimitsException", inputs: [] },
296
+ { type: "error", name: "IncorrectLiquidationThresholdException", inputs: [] },
297
+ { type: "error", name: "IncorrectParameterException", inputs: [] },
298
+ { type: "error", name: "IncorrectPriceException", inputs: [] },
299
+ { type: "error", name: "IncorrectPriceFeedException", inputs: [] },
300
+ { type: "error", name: "IncorrectTokenContractException", inputs: [] },
301
+ { type: "error", name: "InsufficientBalanceException", inputs: [] },
302
+ { type: "error", name: "InsufficientRemainingFundsException", inputs: [] },
303
+ { type: "error", name: "InsufficientVotesException", inputs: [] },
304
+ { type: "error", name: "InvalidBotException", inputs: [] },
305
+ {
306
+ type: "error",
307
+ name: "InvalidCollateralHintException",
308
+ inputs: [{ name: "mask", type: "uint256", internalType: "uint256" }]
309
+ },
310
+ {
311
+ type: "error",
312
+ name: "MasterCreditAccountAlreadyDeployedException",
313
+ inputs: []
314
+ },
315
+ {
316
+ type: "error",
317
+ name: "NoPermissionException",
318
+ inputs: [{ name: "permission", type: "uint256", internalType: "uint256" }]
319
+ },
320
+ { type: "error", name: "NotAllowedAfterExpirationException", inputs: [] },
321
+ { type: "error", name: "NotAllowedWhenNotExpirableException", inputs: [] },
322
+ {
323
+ type: "error",
324
+ name: "NotApprovedBotException",
325
+ inputs: [{ name: "bot", type: "address", internalType: "address" }]
326
+ },
327
+ { type: "error", name: "NotEnoughCollateralException", inputs: [] },
328
+ { type: "error", name: "NotImplementedException", inputs: [] },
329
+ { type: "error", name: "PriceFeedDoesNotExistException", inputs: [] },
330
+ { type: "error", name: "PriceFeedIsNotUpdatableException", inputs: [] },
331
+ { type: "error", name: "QuotaIsOutOfBoundsException", inputs: [] },
332
+ { type: "error", name: "RampDurationTooShortException", inputs: [] },
333
+ { type: "error", name: "ReceiveIsNotAllowedException", inputs: [] },
334
+ { type: "error", name: "RegisteredCreditManagerOnlyException", inputs: [] },
335
+ { type: "error", name: "RegisteredPoolOnlyException", inputs: [] },
336
+ {
337
+ type: "error",
338
+ name: "RemainingTokenBalanceIncreasedException",
339
+ inputs: [{ name: "token", type: "address", internalType: "address" }]
340
+ },
341
+ {
342
+ type: "error",
343
+ name: "SeizedLessThanRequiredException",
344
+ inputs: [
345
+ { name: "seizedAmount", type: "uint256", internalType: "uint256" }
346
+ ]
347
+ },
348
+ { type: "error", name: "StalePriceException", inputs: [] },
349
+ { type: "error", name: "TargetContractNotAllowedException", inputs: [] },
350
+ { type: "error", name: "TokenAlreadyAddedException", inputs: [] },
351
+ { type: "error", name: "TokenIsNotQuotedException", inputs: [] },
352
+ { type: "error", name: "TokenNotAllowedException", inputs: [] },
353
+ { type: "error", name: "TooManyActiveBotsException", inputs: [] },
354
+ { type: "error", name: "TooManyEnabledTokensException", inputs: [] },
355
+ { type: "error", name: "TooManyTokensException", inputs: [] },
356
+ { type: "error", name: "UnderlyingIsNotLiquidatableException", inputs: [] },
357
+ {
358
+ type: "error",
359
+ name: "UnexpectedPermissionsException",
360
+ inputs: [{ name: "permissions", type: "uint256", internalType: "uint256" }]
361
+ },
362
+ {
363
+ type: "error",
364
+ name: "UnknownMethodException",
365
+ inputs: [{ name: "selector", type: "bytes4", internalType: "bytes4" }]
366
+ },
367
+ { type: "error", name: "UpdateQuotaOnZeroDebtAccountException", inputs: [] },
368
+ { type: "error", name: "ValueOutOfRangeException", inputs: [] },
369
+ { type: "error", name: "VotingContractNotAllowedException", inputs: [] },
370
+ { type: "error", name: "ZeroAddressException", inputs: [] }
371
+ ];
185
372
  const errorAbis = [
186
- ...iExceptionsAbi,
373
+ ...iExceptionsV300Abi,
374
+ ...iExceptionsV310Abi,
187
375
  ...iRedstonePriceFeedExceptionsAbi,
188
376
  ...iRedstoneErrorsAbi,
189
377
  ...ilpPriceFeedExceptionsAbi,
190
- ...iRouterV3ErrorsAbi
378
+ ...iRouterErrorsV300Abi,
379
+ ...iRouterErrorsV310Abi
191
380
  ];
192
381
  export {
193
382
  errorAbis,
194
- iExceptionsAbi,
383
+ iExceptionsV300Abi,
384
+ iExceptionsV310Abi,
195
385
  iRedstoneErrorsAbi,
196
386
  iRedstonePriceFeedExceptionsAbi,
197
- iRouterV3ErrorsAbi,
387
+ iRouterErrorsV300Abi,
388
+ iRouterErrorsV310Abi,
198
389
  ilpPriceFeedExceptionsAbi
199
390
  };
@@ -1,4 +1,4 @@
1
- const iDegenDistributorAbi = [
1
+ const iDegenDistributorV300Abi = [
2
2
  {
3
3
  type: "function",
4
4
  inputs: [
@@ -18,6 +18,13 @@ const iDegenDistributorAbi = [
18
18
  outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
19
19
  stateMutability: "view"
20
20
  },
21
+ {
22
+ type: "function",
23
+ inputs: [],
24
+ name: "degenNFT",
25
+ outputs: [{ name: "", internalType: "address", type: "address" }],
26
+ stateMutability: "view"
27
+ },
21
28
  {
22
29
  type: "function",
23
30
  inputs: [],
@@ -65,5 +72,5 @@ const iDegenDistributorAbi = [
65
72
  }
66
73
  ];
67
74
  export {
68
- iDegenDistributorAbi
75
+ iDegenDistributorV300Abi
69
76
  };
@@ -134,7 +134,12 @@ class BytecodeRepositoryContract extends BaseContract {
134
134
  if (code === void 0 || code === "0x") {
135
135
  return [];
136
136
  }
137
- const publicDomains = await this.contract.read.getPublicDomains();
137
+ let publicDomains = [];
138
+ try {
139
+ publicDomains = await this.contract.read.getPublicDomains();
140
+ } catch {
141
+ publicDomains = [];
142
+ }
138
143
  const publicDomainsString = publicDomains.map(
139
144
  (domain) => hexToString(domain, { size: 32 })
140
145
  );
@@ -12,12 +12,18 @@ class ArchiveTransport {
12
12
  enableLogging: false,
13
13
  ...config
14
14
  };
15
- this.primaryTransport = http(this.config.primaryRpcUrl, {
15
+ if (!config.primaryRpcUrl && !config.primaryTransport) {
16
+ throw new Error("primaryRpcUrl or primaryTransport are required");
17
+ }
18
+ if (!config.archiveRpcUrl && !config.archiveTransport) {
19
+ throw new Error("archiveRpcUrl or archiveTransport are required");
20
+ }
21
+ this.primaryTransport = config.primaryTransport ?? http(config.primaryRpcUrl, {
16
22
  retryCount: this.config.retryCount,
17
23
  retryDelay: this.config.retryDelay,
18
24
  timeout: this.config.timeout
19
25
  });
20
- this.archiveTransport = http(this.config.archiveRpcUrl, {
26
+ this.archiveTransport = config.archiveTransport ?? http(config.archiveRpcUrl, {
21
27
  retryCount: this.config.retryCount,
22
28
  retryDelay: this.config.retryDelay,
23
29
  timeout: this.config.timeout
@@ -217,27 +223,6 @@ class ArchiveTransport {
217
223
  getConfig() {
218
224
  return { ...this.config };
219
225
  }
220
- /**
221
- * Update configuration (will invalidate cached transport)
222
- */
223
- updateConfig(updates) {
224
- this.config = { ...this.config, ...updates };
225
- this.cachedTransport = void 0;
226
- if (updates.primaryRpcUrl) {
227
- this.primaryTransport = http(this.config.primaryRpcUrl, {
228
- retryCount: this.config.retryCount,
229
- retryDelay: this.config.retryDelay,
230
- timeout: this.config.timeout
231
- });
232
- }
233
- if (updates.archiveRpcUrl) {
234
- this.archiveTransport = http(this.config.archiveRpcUrl, {
235
- retryCount: this.config.retryCount,
236
- retryDelay: this.config.retryDelay,
237
- timeout: this.config.timeout
238
- });
239
- }
240
- }
241
226
  /**
242
227
  * Enable or disable logging
243
228
  */