From 17a98dbe1747f60bf2f0dc292acdb8c64dda174b Mon Sep 17 00:00:00 2001 From: Anton Kovalchuk Date: Sun, 19 Jan 2025 23:12:49 +0100 Subject: [PATCH] save deploy block number to file --- utils/deployment/DeployScript.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/utils/deployment/DeployScript.ts b/utils/deployment/DeployScript.ts index f9389385..0baa9e7e 100644 --- a/utils/deployment/DeployScript.ts +++ b/utils/deployment/DeployScript.ts @@ -59,6 +59,7 @@ export class DeployScript { private contracts: Contract[] = []; public readonly deployer: Wallet; private resultJson: { [key: string]: any } = {}; + public lastBlockNumber: number = 0; constructor(deployer: Wallet, logger?: Logger) { this.deployer = deployer; @@ -108,7 +109,8 @@ export class DeployScript { const contract = await new Factory(deployer).deploy(...step.args); const deployTx = contract.deployTransaction; this._log(`Waiting for tx: ${getBlockExplorerTxLinkByChainId(deployTx)}`); - await deployTx.wait(); + const receipt = await deployTx.wait(); + this.lastBlockNumber = receipt.blockNumber; this._log( `Contract ${chalk.yellow( factoryName