@gearbox-protocol/deploy-tools 5.10.5 → 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 +25 -9
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -369687,11 +369687,11 @@ var AddressMap = class {
|
|
|
369687
369687
|
* @returns
|
|
369688
369688
|
*/
|
|
369689
369689
|
mustGet(address) {
|
|
369690
|
-
const
|
|
369691
|
-
if (!
|
|
369690
|
+
const key = getAddress(address);
|
|
369691
|
+
if (!this.#map.has(key)) {
|
|
369692
369692
|
throw new Error(`address ${address} not found in ${this.#name ?? "map"}`);
|
|
369693
369693
|
}
|
|
369694
|
-
return
|
|
369694
|
+
return this.#map.get(key);
|
|
369695
369695
|
}
|
|
369696
369696
|
clear() {
|
|
369697
369697
|
this.#map.clear();
|
|
@@ -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"
|
|
@@ -413988,7 +414004,7 @@ var package_default = {
|
|
|
413988
414004
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
413989
414005
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
413990
414006
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
413991
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
414007
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.237",
|
|
413992
414008
|
"@gearbox-protocol/sdk-gov": "^2.34.1",
|
|
413993
414009
|
"@types/lodash-es": "^4.17.12",
|
|
413994
414010
|
"@types/node": "^22.13.1",
|
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.10.
|
|
4
|
+
"version": "5.10.7",
|
|
5
5
|
"homepage": "https://gearbox.fi",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"gearbox"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@gearbox-protocol/deploy-tools-node": "0.0.0",
|
|
45
45
|
"@gearbox-protocol/deploy-tools-shared": "0.0.0",
|
|
46
46
|
"@gearbox-protocol/deploy-tools-types": "0.0.0",
|
|
47
|
-
"@gearbox-protocol/sdk": "3.0.0-vfour.
|
|
47
|
+
"@gearbox-protocol/sdk": "3.0.0-vfour.237",
|
|
48
48
|
"@gearbox-protocol/sdk-gov": "^2.34.1",
|
|
49
49
|
"@types/lodash-es": "^4.17.12",
|
|
50
50
|
"@types/node": "^22.13.1",
|