@gearbox-protocol/deploy-tools 4.8.0 → 4.10.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 +26 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -350370,6 +350370,7 @@ var CONTRACT_NAME_TO_TYPE = new Map([
|
|
|
350370
350370
|
["CurveCryptoLPPriceFeed", "PRICE_FEED_CURVE_CRYPTO_ORACLE"],
|
|
350371
350371
|
["DataCompressorV2_10", "DATA_COMPRESSOR_V210"],
|
|
350372
350372
|
["DataCompressorV3_00", "DATA_COMPRESSOR_V3"],
|
|
350373
|
+
["DataCompressorV3", "DATA_COMPRESSOR_V3"],
|
|
350373
350374
|
["DegenNFTV2", "DEGEN_NFT"],
|
|
350374
350375
|
["FarmingPool", "ONE_INCH_FARMING_POOL"],
|
|
350375
350376
|
["GaugeV3", "GAUGE_V3"],
|
|
@@ -350616,8 +350617,8 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350616
350617
|
#dc210;
|
|
350617
350618
|
#dc300;
|
|
350618
350619
|
#configrator;
|
|
350619
|
-
async setLtZero() {
|
|
350620
|
-
this.logger.info(
|
|
350620
|
+
async setLtZero(opts) {
|
|
350621
|
+
this.logger.info(`running zero lt script on with cm ${opts.cm}`);
|
|
350621
350622
|
await this.init();
|
|
350622
350623
|
const addressProvider = IAddressProviderV3__factory.connect(this.address("ADDRESS_PROVIDER"), this.provider);
|
|
350623
350624
|
this.logger?.debug(`addressProvider: ${this.address("ADDRESS_PROVIDER")}`);
|
|
@@ -350631,10 +350632,7 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350631
350632
|
this.#acl = IACL__factory.connect(aclAddr, this.provider);
|
|
350632
350633
|
this.#configrator = await this.#acl.owner();
|
|
350633
350634
|
this.logger?.debug("configurator: ", this.#configrator);
|
|
350634
|
-
const [cmV2s, cmV3s] = await
|
|
350635
|
-
this.#dc210.getCreditManagersV2List(),
|
|
350636
|
-
this.#dc300.getCreditManagersV3List()
|
|
350637
|
-
]);
|
|
350635
|
+
const [cmV2s, cmV3s] = await this.#loadCMs(opts.cm);
|
|
350638
350636
|
this.logger.debug(`managers: ${cmV2s.length} v2, ${cmV3s.length} v3`);
|
|
350639
350637
|
for (const i of cmV2s) {
|
|
350640
350638
|
await this.#setOnV2(i);
|
|
@@ -350700,6 +350698,25 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350700
350698
|
}
|
|
350701
350699
|
logger2.info("zero lt OK for CM " + cm.addr);
|
|
350702
350700
|
}
|
|
350701
|
+
async #loadCMs(cmAddr) {
|
|
350702
|
+
if (!cmAddr) {
|
|
350703
|
+
return Promise.all([
|
|
350704
|
+
this.#dc210.getCreditManagersV2List(),
|
|
350705
|
+
this.#dc300.getCreditManagersV3List()
|
|
350706
|
+
]);
|
|
350707
|
+
}
|
|
350708
|
+
const cm = ICreditManagerV3__factory.connect(cmAddr);
|
|
350709
|
+
const v = await cm.version();
|
|
350710
|
+
if (v >= 200 && v <= 299) {
|
|
350711
|
+
const cmV2 = await this.#dc210.getCreditManagerData(cmAddr);
|
|
350712
|
+
return [[cmV2], []];
|
|
350713
|
+
}
|
|
350714
|
+
if (v >= 300 && v <= 399) {
|
|
350715
|
+
const cmV3 = await this.#dc300.getCreditManagerData(cmAddr);
|
|
350716
|
+
return [[], [cmV3]];
|
|
350717
|
+
}
|
|
350718
|
+
return [[], []];
|
|
350719
|
+
}
|
|
350703
350720
|
};
|
|
350704
350721
|
|
|
350705
350722
|
// src/commands/options.ts
|
|
@@ -351792,7 +351809,7 @@ function getRenderer(opts) {
|
|
|
351792
351809
|
}
|
|
351793
351810
|
|
|
351794
351811
|
// package.json
|
|
351795
|
-
var version3 = "4.
|
|
351812
|
+
var version3 = "4.10.0";
|
|
351796
351813
|
|
|
351797
351814
|
// src/version.ts
|
|
351798
351815
|
var version_default = version3;
|
|
@@ -352306,9 +352323,9 @@ function warpTime() {
|
|
|
352306
352323
|
|
|
352307
352324
|
// src/commands/zero-lt.ts
|
|
352308
352325
|
function zeroLT() {
|
|
352309
|
-
return new Command().name("zero-lt").description("sets LTs to zero on credit managers").addOption(RpcURL(true)).action(async (opts) => {
|
|
352326
|
+
return new Command().name("zero-lt").description("sets LTs to zero on credit managers").addOption(RpcURL(true)).addOption(new Option("--cm [address]", "Single credit manager option")).action(async (opts) => {
|
|
352310
352327
|
const zlt = new ZeroLT(opts);
|
|
352311
|
-
await zlt.setLtZero();
|
|
352328
|
+
await zlt.setLtZero(opts);
|
|
352312
352329
|
});
|
|
352313
352330
|
}
|
|
352314
352331
|
|