@gearbox-protocol/deploy-tools 5.11.7 → 5.11.9
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 +35 -20
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -414021,6 +414021,8 @@ function openAccounts() {
|
|
|
414021
414021
|
"SHARED_DIR"
|
|
414022
414022
|
)
|
|
414023
414023
|
).addOption(new Option("--nexo", "try to open accounts in Nexo")).addOption(
|
|
414024
|
+
new Option("--automine <interval>", "optional automine interval")
|
|
414025
|
+
).addOption(
|
|
414024
414026
|
new Option("--anvil-url <url>", "anvil rpc url").env("ANVIL_URL")
|
|
414025
414027
|
).action(async (opts) => {
|
|
414026
414028
|
log_default.info("starting sdk v3.1 example");
|
|
@@ -414031,7 +414033,8 @@ function openAccounts() {
|
|
|
414031
414033
|
anvilUrl = "http://127.0.0.1:8545",
|
|
414032
414034
|
sharedDir = ".",
|
|
414033
414035
|
nexo,
|
|
414034
|
-
castBin = "cast"
|
|
414036
|
+
castBin = "cast",
|
|
414037
|
+
automine: automineIntervalS = "1"
|
|
414035
414038
|
} = opts;
|
|
414036
414039
|
await mkdir2(path9.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
414037
414040
|
const sdkExample2 = new SDKExample(log_default);
|
|
@@ -414072,7 +414075,12 @@ function openAccounts() {
|
|
|
414072
414075
|
}
|
|
414073
414076
|
}
|
|
414074
414077
|
);
|
|
414075
|
-
|
|
414078
|
+
const automineInterval = parseInt(automineIntervalS, 10);
|
|
414079
|
+
const automine = await anvil.getAutomine();
|
|
414080
|
+
await anvil.setBlockTimestampInterval({ interval: automineInterval });
|
|
414081
|
+
log_default.debug(
|
|
414082
|
+
`setting block timestamp interval, automine: ${automine}, interval ${automineInterval}`
|
|
414083
|
+
);
|
|
414076
414084
|
const borrowerKey = generatePrivateKey();
|
|
414077
414085
|
const borrower = privateKeyToAccount(borrowerKey);
|
|
414078
414086
|
await anvil.setBalance({
|
|
@@ -414162,6 +414170,7 @@ function openAccounts() {
|
|
|
414162
414170
|
log_default.error(`failed to open accounts: ${e}`);
|
|
414163
414171
|
} finally {
|
|
414164
414172
|
await anvil.removeBlockTimestampInterval();
|
|
414173
|
+
log_default.debug("removing block timestamp interval");
|
|
414165
414174
|
}
|
|
414166
414175
|
log_default.info("done");
|
|
414167
414176
|
});
|
|
@@ -414246,7 +414255,7 @@ function getRenderer(opts) {
|
|
|
414246
414255
|
var package_default = {
|
|
414247
414256
|
name: "@gearbox-protocol/deploy-tools",
|
|
414248
414257
|
description: "Gearbox deploy tools",
|
|
414249
|
-
version: "5.11.
|
|
414258
|
+
version: "5.11.9",
|
|
414250
414259
|
homepage: "https://gearbox.fi",
|
|
414251
414260
|
keywords: [
|
|
414252
414261
|
"gearbox"
|
|
@@ -414414,23 +414423,29 @@ function sdkExample() {
|
|
|
414414
414423
|
sharedDir = "."
|
|
414415
414424
|
} = opts;
|
|
414416
414425
|
await mkdir3(path11.resolve(sharedDir, "deploy-state"), { recursive: true });
|
|
414417
|
-
const
|
|
414418
|
-
await
|
|
414419
|
-
|
|
414420
|
-
|
|
414421
|
-
|
|
414422
|
-
|
|
414423
|
-
|
|
414424
|
-
|
|
414425
|
-
|
|
414426
|
-
|
|
414427
|
-
|
|
414428
|
-
|
|
414429
|
-
|
|
414430
|
-
|
|
414431
|
-
|
|
414432
|
-
|
|
414433
|
-
|
|
414426
|
+
const anvil = createAnvilClient({ transport: http(anvilUrl) });
|
|
414427
|
+
await anvil.setBlockTimestampInterval({ interval: 0 });
|
|
414428
|
+
try {
|
|
414429
|
+
const sdkExample2 = new SDKExample(log_default);
|
|
414430
|
+
await sdkExample2.run({
|
|
414431
|
+
addressProvider,
|
|
414432
|
+
addressProviderJson,
|
|
414433
|
+
marketConfigurators: marketConfigurators ?? [],
|
|
414434
|
+
anvilUrl,
|
|
414435
|
+
outFile: path11.resolve(
|
|
414436
|
+
sharedDir,
|
|
414437
|
+
"deploy-state",
|
|
414438
|
+
"stateAfter.human.json"
|
|
414439
|
+
)
|
|
414440
|
+
});
|
|
414441
|
+
await writeFile8(
|
|
414442
|
+
path11.resolve(sharedDir, "deploy-state", "stateAfter.json"),
|
|
414443
|
+
json_stringify(sdkExample2.sdk.state),
|
|
414444
|
+
"utf-8"
|
|
414445
|
+
);
|
|
414446
|
+
} finally {
|
|
414447
|
+
await anvil.removeBlockTimestampInterval();
|
|
414448
|
+
}
|
|
414434
414449
|
log_default.info("done");
|
|
414435
414450
|
});
|
|
414436
414451
|
}
|