Skip to content

Commit

Permalink
save deploy block number to file
Browse files Browse the repository at this point in the history
  • Loading branch information
kovalgek committed Jan 19, 2025
1 parent 0ddc2b1 commit 17a98db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/deployment/DeployScript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 17a98db

Please sign in to comment.