@gearbox-protocol/deploy-tools 5.8.0 → 5.9.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/index.mjs +44 -38
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -74488,12 +74488,12 @@ var require_retry = __commonJS({
|
|
|
74488
74488
|
"use strict";
|
|
74489
74489
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
74490
74490
|
exports2.waitForSuccess = void 0;
|
|
74491
|
-
exports2.retry =
|
|
74491
|
+
exports2.retry = retry3;
|
|
74492
74492
|
var logger_1 = require_logger();
|
|
74493
74493
|
var errors_1 = require_errors2();
|
|
74494
74494
|
var time_1 = require_time();
|
|
74495
74495
|
var logger2 = (0, logger_1.loggerFactory)("retry");
|
|
74496
|
-
function
|
|
74496
|
+
function retry3(config) {
|
|
74497
74497
|
if (config.maxRetries === 0) {
|
|
74498
74498
|
throw new Error(`Setting 'config.maxRetries' to 0 will never call the underlying function`);
|
|
74499
74499
|
}
|
|
@@ -100044,8 +100044,8 @@ var require_fetch = __commonJS({
|
|
|
100044
100044
|
get retryFunc() {
|
|
100045
100045
|
return this.#retry || null;
|
|
100046
100046
|
}
|
|
100047
|
-
set retryFunc(
|
|
100048
|
-
this.#retry =
|
|
100047
|
+
set retryFunc(retry3) {
|
|
100048
|
+
this.#retry = retry3;
|
|
100049
100049
|
}
|
|
100050
100050
|
/**
|
|
100051
100051
|
* This function is called to fetch content from HTTP and
|
|
@@ -172156,7 +172156,7 @@ var require_withRetry = __commonJS({
|
|
|
172156
172156
|
function withRetry2(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {
|
|
172157
172157
|
return new Promise((resolve2, reject) => {
|
|
172158
172158
|
const attemptRetry = async ({ count = 0 } = {}) => {
|
|
172159
|
-
const
|
|
172159
|
+
const retry3 = async ({ error }) => {
|
|
172160
172160
|
const delay = typeof delay_ === "function" ? delay_({ count, error }) : delay_;
|
|
172161
172161
|
if (delay)
|
|
172162
172162
|
await (0, wait_js_1.wait)(delay);
|
|
@@ -172167,7 +172167,7 @@ var require_withRetry = __commonJS({
|
|
|
172167
172167
|
resolve2(data);
|
|
172168
172168
|
} catch (err) {
|
|
172169
172169
|
if (count < retryCount && await shouldRetry2({ count, error: err }))
|
|
172170
|
-
return
|
|
172170
|
+
return retry3({ error: err });
|
|
172171
172171
|
reject(err);
|
|
172172
172172
|
}
|
|
172173
172173
|
};
|
|
@@ -263022,8 +263022,8 @@ var require_fetch2 = __commonJS({
|
|
|
263022
263022
|
get retryFunc() {
|
|
263023
263023
|
return this.#retry || null;
|
|
263024
263024
|
}
|
|
263025
|
-
set retryFunc(
|
|
263026
|
-
this.#retry =
|
|
263025
|
+
set retryFunc(retry3) {
|
|
263026
|
+
this.#retry = retry3;
|
|
263027
263027
|
}
|
|
263028
263028
|
/**
|
|
263029
263029
|
* This function is called to fetch content from HTTP and
|
|
@@ -334587,7 +334587,7 @@ function withDedupe(fn, { enabled = true, id }) {
|
|
|
334587
334587
|
function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true } = {}) {
|
|
334588
334588
|
return new Promise((resolve2, reject) => {
|
|
334589
334589
|
const attemptRetry = async ({ count = 0 } = {}) => {
|
|
334590
|
-
const
|
|
334590
|
+
const retry3 = async ({ error }) => {
|
|
334591
334591
|
const delay = typeof delay_ === "function" ? delay_({ count, error }) : delay_;
|
|
334592
334592
|
if (delay)
|
|
334593
334593
|
await wait(delay);
|
|
@@ -334598,7 +334598,7 @@ function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shoul
|
|
|
334598
334598
|
resolve2(data);
|
|
334599
334599
|
} catch (err) {
|
|
334600
334600
|
if (count < retryCount && await shouldRetry2({ count, error: err }))
|
|
334601
|
-
return
|
|
334601
|
+
return retry3({ error: err });
|
|
334602
334602
|
reject(err);
|
|
334603
334603
|
}
|
|
334604
334604
|
};
|
|
@@ -340446,11 +340446,6 @@ var iMarketCompressorAbi = [
|
|
|
340446
340446
|
}
|
|
340447
340447
|
]
|
|
340448
340448
|
},
|
|
340449
|
-
{
|
|
340450
|
-
name: "description",
|
|
340451
|
-
type: "string",
|
|
340452
|
-
internalType: "string"
|
|
340453
|
-
},
|
|
340454
340449
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
340455
340450
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
340456
340451
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -341174,11 +341169,6 @@ var iMarketCompressorAbi = [
|
|
|
341174
341169
|
}
|
|
341175
341170
|
]
|
|
341176
341171
|
},
|
|
341177
|
-
{
|
|
341178
|
-
name: "description",
|
|
341179
|
-
type: "string",
|
|
341180
|
-
internalType: "string"
|
|
341181
|
-
},
|
|
341182
341172
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
341183
341173
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
341184
341174
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -341917,11 +341907,6 @@ var iMarketCompressorAbi = [
|
|
|
341917
341907
|
}
|
|
341918
341908
|
]
|
|
341919
341909
|
},
|
|
341920
|
-
{
|
|
341921
|
-
name: "description",
|
|
341922
|
-
type: "string",
|
|
341923
|
-
internalType: "string"
|
|
341924
|
-
},
|
|
341925
341910
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
341926
341911
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
341927
341912
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -342399,7 +342384,6 @@ var iPriceFeedCompressorAbi = [
|
|
|
342399
342384
|
}
|
|
342400
342385
|
]
|
|
342401
342386
|
},
|
|
342402
|
-
{ name: "description", type: "string", internalType: "string" },
|
|
342403
342387
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
342404
342388
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
342405
342389
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -342468,7 +342452,6 @@ var iPriceFeedCompressorAbi = [
|
|
|
342468
342452
|
}
|
|
342469
342453
|
]
|
|
342470
342454
|
},
|
|
342471
|
-
{ name: "description", type: "string", internalType: "string" },
|
|
342472
342455
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
342473
342456
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
342474
342457
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -342528,7 +342511,6 @@ var iPriceFeedCompressorAbi = [
|
|
|
342528
342511
|
}
|
|
342529
342512
|
]
|
|
342530
342513
|
},
|
|
342531
|
-
{ name: "description", type: "string", internalType: "string" },
|
|
342532
342514
|
{ name: "decimals", type: "uint8", internalType: "uint8" },
|
|
342533
342515
|
{ name: "skipCheck", type: "bool", internalType: "bool" },
|
|
342534
342516
|
{ name: "updatable", type: "bool", internalType: "bool" },
|
|
@@ -364819,6 +364801,22 @@ var TypedObjectUtils = class _TypedObjectUtils {
|
|
|
364819
364801
|
{}
|
|
364820
364802
|
);
|
|
364821
364803
|
};
|
|
364804
|
+
async function retry(fn, options = {}) {
|
|
364805
|
+
const { attempts = 3, interval = 200 } = options;
|
|
364806
|
+
let cause;
|
|
364807
|
+
for (let i = 0; i < attempts; i++) {
|
|
364808
|
+
try {
|
|
364809
|
+
const result = await fn();
|
|
364810
|
+
return result;
|
|
364811
|
+
} catch (e) {
|
|
364812
|
+
cause = e;
|
|
364813
|
+
await new Promise((resolve2) => {
|
|
364814
|
+
setTimeout(resolve2, interval);
|
|
364815
|
+
});
|
|
364816
|
+
}
|
|
364817
|
+
}
|
|
364818
|
+
throw new Error(`all attempts failed: ${cause}`);
|
|
364819
|
+
}
|
|
364822
364820
|
var AddressLabeller = class {
|
|
364823
364821
|
#labels = new AddressMap();
|
|
364824
364822
|
set(address, label) {
|
|
@@ -373827,7 +373825,10 @@ var RedstoneUpdater = class extends SDKConstruct {
|
|
|
373827
373825
|
historicalTimestamp: this.#historicalTimestampMs,
|
|
373828
373826
|
urls: this.#gateways
|
|
373829
373827
|
});
|
|
373830
|
-
const dataPayload = await
|
|
373828
|
+
const dataPayload = await retry(
|
|
373829
|
+
() => wrapper.prepareRedstonePayload(true),
|
|
373830
|
+
{ attempts: 5, interval: this.#historicalTimestampMs ? 30500 : 250 }
|
|
373831
|
+
);
|
|
373831
373832
|
const parsed = import_protocol.RedstonePayload.parse(toBytes(`0x${dataPayload}`));
|
|
373832
373833
|
const packagesByDataFeedId = groupDataPackages(parsed.signedDataPackages);
|
|
373833
373834
|
return dataPackagesIds.map((dataFeedId) => {
|
|
@@ -375158,7 +375159,6 @@ function assetsMap(assets) {
|
|
|
375158
375159
|
}
|
|
375159
375160
|
var CreditAccountsService = class extends SDKConstruct {
|
|
375160
375161
|
#compressor;
|
|
375161
|
-
#rewardCompressor;
|
|
375162
375162
|
#batchSize;
|
|
375163
375163
|
#logger;
|
|
375164
375164
|
constructor(sdk, options) {
|
|
@@ -375166,9 +375166,6 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
375166
375166
|
this.#compressor = sdk.addressProvider.getLatestVersion(
|
|
375167
375167
|
AP_CREDIT_ACCOUNT_COMPRESSOR
|
|
375168
375168
|
);
|
|
375169
|
-
this.#rewardCompressor = sdk.addressProvider.getLatestVersion(
|
|
375170
|
-
AP_REWARDS_COMPRESSOR
|
|
375171
|
-
);
|
|
375172
375169
|
this.#batchSize = options?.batchSize;
|
|
375173
375170
|
this.#logger = childLogger("CreditAccountsService", sdk.logger);
|
|
375174
375171
|
}
|
|
@@ -375274,7 +375271,7 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
375274
375271
|
async getRewards(account) {
|
|
375275
375272
|
const rewards = await this.provider.publicClient.readContract({
|
|
375276
375273
|
abi: iRewardCompressorAbi,
|
|
375277
|
-
address: this
|
|
375274
|
+
address: this.rewardCompressor,
|
|
375278
375275
|
functionName: "getRewards",
|
|
375279
375276
|
args: [account]
|
|
375280
375277
|
});
|
|
@@ -375866,6 +375863,9 @@ var CreditAccountsService = class extends SDKConstruct {
|
|
|
375866
375863
|
get marketConfigurators() {
|
|
375867
375864
|
return this.sdk.marketRegister.marketConfigurators.map((mc) => mc.address);
|
|
375868
375865
|
}
|
|
375866
|
+
get rewardCompressor() {
|
|
375867
|
+
return this.sdk.addressProvider.getLatestVersion(AP_REWARDS_COMPRESSOR);
|
|
375868
|
+
}
|
|
375869
375869
|
};
|
|
375870
375870
|
var AbstractAddressProviderContract = class extends BaseContract {
|
|
375871
375871
|
#addresses = {};
|
|
@@ -376243,7 +376243,8 @@ var EXTRA_FARM_TOKENS = {
|
|
|
376243
376243
|
PT_sUSDe_27MAR2025: true,
|
|
376244
376244
|
DVstETH: true,
|
|
376245
376245
|
beraSTONE: true,
|
|
376246
|
-
PT_sUSDe_29MAY2025: true
|
|
376246
|
+
PT_sUSDe_29MAY2025: true,
|
|
376247
|
+
tETH: true
|
|
376247
376248
|
};
|
|
376248
376249
|
var { USDe, ...rest } = EXTRA_FARM_TOKENS;
|
|
376249
376250
|
var CREDIT_SESSION_STATUS_BY_ID = {
|
|
@@ -398300,6 +398301,10 @@ var ForkTemplate = z.object({
|
|
|
398300
398301
|
* Will set appropriate RPC urls
|
|
398301
398302
|
*/
|
|
398302
398303
|
network: z.enum(SUPPORTED_CHAINS).default("Mainnet"),
|
|
398304
|
+
/**
|
|
398305
|
+
* Extra flags to pass to anvil
|
|
398306
|
+
*/
|
|
398307
|
+
anvilFlags: z.array(z.string()).nullish().transform((v) => v?.length ? v : void 0),
|
|
398303
398308
|
/**
|
|
398304
398309
|
* Block offset expression to determine starting block of a fork
|
|
398305
398310
|
* Expression has following rules:
|
|
@@ -400392,7 +400397,8 @@ function createAnvilClient({
|
|
|
400392
400397
|
chain,
|
|
400393
400398
|
mode: "anvil",
|
|
400394
400399
|
transport,
|
|
400395
|
-
cacheTime: 0
|
|
400400
|
+
cacheTime: 0,
|
|
400401
|
+
pollingInterval: 50
|
|
400396
400402
|
}
|
|
400397
400403
|
).extend(publicActions).extend(walletActions).extend((client) => ({
|
|
400398
400404
|
anvilNodeInfo: () => anvilNodeInfo(client),
|
|
@@ -408659,7 +408665,7 @@ function getRenderer(opts) {
|
|
|
408659
408665
|
var package_default = {
|
|
408660
408666
|
name: "@gearbox-protocol/deploy-tools",
|
|
408661
408667
|
description: "Gearbox deploy tools",
|
|
408662
|
-
version: "5.
|
|
408668
|
+
version: "5.9.0",
|
|
408663
408669
|
homepage: "https://gearbox.fi",
|
|
408664
408670
|
keywords: [
|
|
408665
408671
|
"gearbox"
|
|
@@ -408702,7 +408708,7 @@ var package_default = {
|
|
|
408702
408708
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
408703
408709
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
408704
408710
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
408705
|
-
"@gearbox-protocol/sdk": "^3.0.0-vfour.
|
|
408711
|
+
"@gearbox-protocol/sdk": "^3.0.0-vfour.205",
|
|
408706
408712
|
"@gearbox-protocol/sdk-gov": "^2.34.0",
|
|
408707
408713
|
"@types/lodash-es": "^4.17.12",
|
|
408708
408714
|
"@types/node": "^22.12.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/deploy-tools",
|
|
3
3
|
"description": "Gearbox deploy tools",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.9.0",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
45
45
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
46
46
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
47
|
-
"@gearbox-protocol/sdk": "^3.0.0-vfour.
|
|
47
|
+
"@gearbox-protocol/sdk": "^3.0.0-vfour.205",
|
|
48
48
|
"@gearbox-protocol/sdk-gov": "^2.34.0",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"@types/node": "^22.12.0",
|