@gearbox-protocol/deploy-tools 5.10.6 → 5.10.7
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 +21 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -413799,7 +413799,7 @@ function openAccounts() {
|
|
|
413799
413799
|
new Option("--shared-dir <dir>", "dir to put output files").env(
|
|
413800
413800
|
"SHARED_DIR"
|
|
413801
413801
|
)
|
|
413802
|
-
).addOption(
|
|
413802
|
+
).addOption(new Option("--nexo", "try to open accounts in Nexo")).addOption(
|
|
413803
413803
|
new Option("--anvil-url <url>", "anvil rpc url").env("ANVIL_URL")
|
|
413804
413804
|
).action(async (opts) => {
|
|
413805
413805
|
log_default.info("starting sdk v3.1 example");
|
|
@@ -413808,7 +413808,8 @@ function openAccounts() {
|
|
|
413808
413808
|
addressProviderJson,
|
|
413809
413809
|
marketConfigurators,
|
|
413810
413810
|
anvilUrl = "http://127.0.0.1:8545",
|
|
413811
|
-
sharedDir = "."
|
|
413811
|
+
sharedDir = ".",
|
|
413812
|
+
nexo
|
|
413812
413813
|
} = opts;
|
|
413813
413814
|
await mkdir2(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
413814
413815
|
const sdkExample2 = new SDKExample(log_default);
|
|
@@ -413854,7 +413855,7 @@ function openAccounts() {
|
|
|
413854
413855
|
faucet: faucetAddr
|
|
413855
413856
|
});
|
|
413856
413857
|
try {
|
|
413857
|
-
|
|
413858
|
+
let accounts = [
|
|
413858
413859
|
{
|
|
413859
413860
|
creditManager: "0x50ba483272484fc5eebe8676dc87d814a11faef6",
|
|
413860
413861
|
// restaking weth
|
|
@@ -413885,7 +413886,22 @@ function openAccounts() {
|
|
|
413885
413886
|
collateral: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497"
|
|
413886
413887
|
// sUSDe
|
|
413887
413888
|
}
|
|
413888
|
-
]
|
|
413889
|
+
];
|
|
413890
|
+
if (nexo) {
|
|
413891
|
+
const nexoCM = sdkExample2.sdk.marketRegister.creditManagers.find(
|
|
413892
|
+
(cm) => cm.name === "NEXO USDT stable S"
|
|
413893
|
+
);
|
|
413894
|
+
const nexoCMAddress = nexoCM?.creditManager.address;
|
|
413895
|
+
log_default.debug(`found nexo credit manager: ${nexoCMAddress}`);
|
|
413896
|
+
if (nexoCMAddress) {
|
|
413897
|
+
const collaterals = ["USDC", "DAI", "sUSDe", "PT-sUSDE-27MAR2025"].map((s) => sdkExample2.sdk.tokensMeta.findBySymbol(s)?.addr).filter(Boolean);
|
|
413898
|
+
accounts = collaterals.map((collateral) => ({
|
|
413899
|
+
creditManager: nexoCMAddress,
|
|
413900
|
+
collateral
|
|
413901
|
+
}));
|
|
413902
|
+
}
|
|
413903
|
+
}
|
|
413904
|
+
const opened = await accountOpener.openCreditAccounts(accounts);
|
|
413889
413905
|
await writeFile6(
|
|
413890
413906
|
path9.resolve(sharedDir, "opened-accounts.json"),
|
|
413891
413907
|
json_stringify(opened),
|
|
@@ -413945,7 +413961,7 @@ function getRenderer(opts) {
|
|
|
413945
413961
|
var package_default = {
|
|
413946
413962
|
name: "@gearbox-protocol/deploy-tools",
|
|
413947
413963
|
description: "Gearbox deploy tools",
|
|
413948
|
-
version: "5.10.
|
|
413964
|
+
version: "5.10.7",
|
|
413949
413965
|
homepage: "https://gearbox.fi",
|
|
413950
413966
|
keywords: [
|
|
413951
413967
|
"gearbox"
|