@gearbox-protocol/deploy-tools 5.16.15 → 5.17.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.
Files changed (2) hide show
  1. package/dist/index.mjs +39 -17
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -413148,6 +413148,7 @@ function openAccounts() {
413148
413148
  zappers: GearboxZappersPlugin
413149
413149
  }
413150
413150
  });
413151
+ console.log(`loaded ${sdk.plugins.zappers.zappers.size} zappers`);
413151
413152
  await writeFile4(
413152
413153
  path9.resolve(sharedDir, "deploy-state", "stateAfter.human.json"),
413153
413154
  json_stringify(sdk.stateHuman()),
@@ -413216,24 +413217,45 @@ function openAccounts() {
413216
413217
  }
413217
413218
  ];
413218
413219
  if (nexo) {
413219
- const nexoCM = sdk.marketRegister.creditManagers.find(
413220
- (cm) => cm.name === "NEXO USDT stable S"
413220
+ accounts = [
413221
+ {
413222
+ creditManager: "0x3EB95430FdB99439A86d3c6D7D01C3c561393556",
413223
+ // [Trade USDC Tier 1]
413224
+ collateral: "0x6B175474E89094C44Da98b954EedeAC495271d0F"
413225
+ // DAI
413226
+ }
413227
+ ];
413228
+ const nexoCMs = sdk.marketRegister.creditManagers.filter(
413229
+ (cm) => cm.name.toLowerCase().includes("nexo")
413221
413230
  );
413222
- const nexoCMAddress = nexoCM?.creditManager.address;
413223
- log_default.debug(`found nexo credit manager: ${nexoCMAddress}`);
413224
- if (nexoCMAddress) {
413225
- const collaterals = ["USDC", "DAI", "sUSDe", "PT-sUSDE-27MAR2025"].map((s) => sdk.tokensMeta.findBySymbol(s)?.addr).filter(Boolean);
413226
- accounts = collaterals.map((collateral) => ({
413227
- creditManager: nexoCMAddress,
413228
- collateral
413229
- }));
413231
+ for (const cm of nexoCMs) {
413232
+ const cmAddr = cm.creditManager.address;
413233
+ log_default.debug(
413234
+ `found nexo credit manager: ${sdk.provider.addressLabels.get(cmAddr)}`
413235
+ );
413236
+ const collateralTokens = /* @__PURE__ */ new Set();
413237
+ for (const [
413238
+ token,
413239
+ lt
413240
+ ] of cm.creditManager.liquidationThresholds.entries()) {
413241
+ if (lt >= 1) {
413242
+ collateralTokens.add(token);
413243
+ log_default.debug(
413244
+ `adding collateral token: ${sdk.provider.addressLabels.get(token)}`
413245
+ );
413246
+ }
413247
+ }
413248
+ collateralTokens.delete(getAddress(cm.underlying));
413249
+ accounts.push(
413250
+ ...Array.from(collateralTokens).map(
413251
+ (collateral) => ({
413252
+ creditManager: cmAddr,
413253
+ collateral,
413254
+ leverage: 3
413255
+ })
413256
+ )
413257
+ );
413230
413258
  }
413231
- accounts.push({
413232
- creditManager: "0x3EB95430FdB99439A86d3c6D7D01C3c561393556",
413233
- // [Trade USDC Tier 1]
413234
- collateral: "0x6B175474E89094C44Da98b954EedeAC495271d0F"
413235
- // DAI
413236
- });
413237
413259
  }
413238
413260
  const results = await accountOpener.openCreditAccounts(accounts, true);
413239
413261
  const destDir = path9.resolve(sharedDir, "open-accounts");
@@ -413344,7 +413366,7 @@ function getRenderer(opts) {
413344
413366
  var package_default = {
413345
413367
  name: "@gearbox-protocol/deploy-tools",
413346
413368
  description: "Gearbox deploy tools",
413347
- version: "5.16.15",
413369
+ version: "5.17.1",
413348
413370
  homepage: "https://gearbox.fi",
413349
413371
  keywords: [
413350
413372
  "gearbox"
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.16.15",
4
+ "version": "5.17.1",
5
5
  "homepage": "https://gearbox.fi",
6
6
  "keywords": [
7
7
  "gearbox"