@gearbox-protocol/deploy-tools 4.9.0 → 4.10.1
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 +28 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -347113,6 +347113,9 @@ var AddressProviderV3Visitor = class extends AbstractVisitor {
|
|
|
347113
347113
|
case "CONTROLLER_TIMELOCK":
|
|
347114
347114
|
contract2 = "CONTROLLER_TIMELOCK_V3";
|
|
347115
347115
|
break;
|
|
347116
|
+
case "DEGEN_NFT":
|
|
347117
|
+
contract2 = "DEGEN_NFT";
|
|
347118
|
+
break;
|
|
347116
347119
|
default:
|
|
347117
347120
|
throw new Error(`unknow address provider key '${contract2}'`);
|
|
347118
347121
|
}
|
|
@@ -350617,8 +350620,8 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350617
350620
|
#dc210;
|
|
350618
350621
|
#dc300;
|
|
350619
350622
|
#configrator;
|
|
350620
|
-
async setLtZero() {
|
|
350621
|
-
this.logger.info(
|
|
350623
|
+
async setLtZero(opts) {
|
|
350624
|
+
this.logger.info(`running zero lt script on with cm ${opts.cm}`);
|
|
350622
350625
|
await this.init();
|
|
350623
350626
|
const addressProvider = IAddressProviderV3__factory.connect(this.address("ADDRESS_PROVIDER"), this.provider);
|
|
350624
350627
|
this.logger?.debug(`addressProvider: ${this.address("ADDRESS_PROVIDER")}`);
|
|
@@ -350632,10 +350635,7 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350632
350635
|
this.#acl = IACL__factory.connect(aclAddr, this.provider);
|
|
350633
350636
|
this.#configrator = await this.#acl.owner();
|
|
350634
350637
|
this.logger?.debug("configurator: ", this.#configrator);
|
|
350635
|
-
const [cmV2s, cmV3s] = await
|
|
350636
|
-
this.#dc210.getCreditManagersV2List(),
|
|
350637
|
-
this.#dc300.getCreditManagersV3List()
|
|
350638
|
-
]);
|
|
350638
|
+
const [cmV2s, cmV3s] = await this.#loadCMs(opts.cm);
|
|
350639
350639
|
this.logger.debug(`managers: ${cmV2s.length} v2, ${cmV3s.length} v3`);
|
|
350640
350640
|
for (const i of cmV2s) {
|
|
350641
350641
|
await this.#setOnV2(i);
|
|
@@ -350701,6 +350701,25 @@ var ZeroLT = class extends ProviderBase {
|
|
|
350701
350701
|
}
|
|
350702
350702
|
logger2.info("zero lt OK for CM " + cm.addr);
|
|
350703
350703
|
}
|
|
350704
|
+
async #loadCMs(cmAddr) {
|
|
350705
|
+
if (!cmAddr) {
|
|
350706
|
+
return Promise.all([
|
|
350707
|
+
this.#dc210.getCreditManagersV2List(),
|
|
350708
|
+
this.#dc300.getCreditManagersV3List()
|
|
350709
|
+
]);
|
|
350710
|
+
}
|
|
350711
|
+
const cm = ICreditManagerV3__factory.connect(cmAddr);
|
|
350712
|
+
const v = await cm.version();
|
|
350713
|
+
if (v >= 200 && v <= 299) {
|
|
350714
|
+
const cmV2 = await this.#dc210.getCreditManagerData(cmAddr);
|
|
350715
|
+
return [[cmV2], []];
|
|
350716
|
+
}
|
|
350717
|
+
if (v >= 300 && v <= 399) {
|
|
350718
|
+
const cmV3 = await this.#dc300.getCreditManagerData(cmAddr);
|
|
350719
|
+
return [[], [cmV3]];
|
|
350720
|
+
}
|
|
350721
|
+
return [[], []];
|
|
350722
|
+
}
|
|
350704
350723
|
};
|
|
350705
350724
|
|
|
350706
350725
|
// src/commands/options.ts
|
|
@@ -351793,7 +351812,7 @@ function getRenderer(opts) {
|
|
|
351793
351812
|
}
|
|
351794
351813
|
|
|
351795
351814
|
// package.json
|
|
351796
|
-
var version3 = "4.
|
|
351815
|
+
var version3 = "4.10.1";
|
|
351797
351816
|
|
|
351798
351817
|
// src/version.ts
|
|
351799
351818
|
var version_default = version3;
|
|
@@ -352307,9 +352326,9 @@ function warpTime() {
|
|
|
352307
352326
|
|
|
352308
352327
|
// src/commands/zero-lt.ts
|
|
352309
352328
|
function zeroLT() {
|
|
352310
|
-
return new Command().name("zero-lt").description("sets LTs to zero on credit managers").addOption(RpcURL(true)).action(async (opts) => {
|
|
352329
|
+
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) => {
|
|
352311
352330
|
const zlt = new ZeroLT(opts);
|
|
352312
|
-
await zlt.setLtZero();
|
|
352331
|
+
await zlt.setLtZero(opts);
|
|
352313
352332
|
});
|
|
352314
352333
|
}
|
|
352315
352334
|
|