@gearbox-protocol/deploy-tools 5.17.0 → 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.
- package/dist/index.mjs +38 -17
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -413217,24 +413217,45 @@ function openAccounts() {
|
|
|
413217
413217
|
}
|
|
413218
413218
|
];
|
|
413219
413219
|
if (nexo) {
|
|
413220
|
-
|
|
413221
|
-
|
|
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")
|
|
413222
413230
|
);
|
|
413223
|
-
const
|
|
413224
|
-
|
|
413225
|
-
|
|
413226
|
-
|
|
413227
|
-
|
|
413228
|
-
|
|
413229
|
-
|
|
413230
|
-
|
|
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
|
+
);
|
|
413231
413258
|
}
|
|
413232
|
-
accounts.push({
|
|
413233
|
-
creditManager: "0x3EB95430FdB99439A86d3c6D7D01C3c561393556",
|
|
413234
|
-
// [Trade USDC Tier 1]
|
|
413235
|
-
collateral: "0x6B175474E89094C44Da98b954EedeAC495271d0F"
|
|
413236
|
-
// DAI
|
|
413237
|
-
});
|
|
413238
413259
|
}
|
|
413239
413260
|
const results = await accountOpener.openCreditAccounts(accounts, true);
|
|
413240
413261
|
const destDir = path9.resolve(sharedDir, "open-accounts");
|
|
@@ -413345,7 +413366,7 @@ function getRenderer(opts) {
|
|
|
413345
413366
|
var package_default = {
|
|
413346
413367
|
name: "@gearbox-protocol/deploy-tools",
|
|
413347
413368
|
description: "Gearbox deploy tools",
|
|
413348
|
-
version: "5.17.
|
|
413369
|
+
version: "5.17.1",
|
|
413349
413370
|
homepage: "https://gearbox.fi",
|
|
413350
413371
|
keywords: [
|
|
413351
413372
|
"gearbox"
|