Skip to content

Commit

Permalink
fix: deploy tw script
Browse files Browse the repository at this point in the history
  • Loading branch information
eddort committed Feb 12, 2025
1 parent 5cff88e commit 5c3647d
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions scripts/triggerable-withdrawals/tw-deploy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as dotenv from "dotenv";
import { ethers, run } from "hardhat";
import { join } from "path";
import readline from "readline";

import { LidoLocator } from "typechain-types";

Expand Down Expand Up @@ -47,7 +46,7 @@ async function main() {

// Deploy ValidatorExitBusOracle
// uint256 secondsPerSlot, uint256 genesisTime, address lidoLocator
const validatorsExitBusOracleArgs = [SECONDS_PER_SLOT, genesisTime, locator];
const validatorsExitBusOracleArgs = [SECONDS_PER_SLOT, genesisTime, locator.address];

const validatorsExitBusOracle = (
await deployImplementation(
Expand All @@ -60,7 +59,6 @@ async function main() {
log.success(`ValidatorsExitBusOracle address: ${validatorsExitBusOracle}`);
log.emptyLine();

// Deploy WithdrawalVault
const withdrawalVaultArgs = [LIDO_PROXY, TREASURY_PROXY];

const withdrawalVault = (
Expand All @@ -69,18 +67,10 @@ async function main() {
log.success(`WithdrawalVault address implementation: ${withdrawalVault}`);
log.emptyLine();

// Deploy AO
// const accountingOracleArgs = [LOCATOR, LIDO, LEGACY_ORACLE, SECONDS_PER_SLOT, GENESIS_TIME];
// const accountingOracleAddress = (
// await deployImplementation(Sk.accountingOracle, "AccountingOracle", deployer, accountingOracleArgs)
// ).address;
// log.success(`AO implementation address: ${accountingOracleAddress}`);
// log.emptyLine();

// await waitForPressButton();

log(cy("Continuing..."));

await new Promise((res) => setTimeout(res, 5000));

await run("verify:verify", {
address: withdrawalVault,
constructorArguments: withdrawalVaultArgs,
Expand All @@ -89,20 +79,8 @@ async function main() {

await run("verify:verify", {
address: validatorsExitBusOracle,
constructorArguments: [],
contract: "contracts/0.8.9/ValidatorsExitBusOracle.sol:ValidatorsExitBusOracle",
});
}

async function waitForPressButton(): Promise<void> {
return new Promise<void>((resolve) => {
log(cy("When contracts will be ready for verification step, press Enter to continue..."));
const rl = readline.createInterface({ input: process.stdin });

rl.on("line", () => {
rl.close();
resolve();
});
constructorArguments: validatorsExitBusOracleArgs,
contract: "contracts/0.8.9/oracle/ValidatorsExitBusOracle.sol:ValidatorsExitBusOracle",
});
}

Expand Down

0 comments on commit 5c3647d

Please sign in to comment.