From 645db5eda2df0f3304a5c22322772758f06bc2b5 Mon Sep 17 00:00:00 2001 From: nikolaivanovj <110764167+nikolaivanovj@users.noreply.github.com> Date: Tue, 7 Jan 2025 00:01:59 +0200 Subject: [PATCH] Update deploy.js --- hardhat/scripts/deploy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardhat/scripts/deploy.js b/hardhat/scripts/deploy.js index 14f72930fd..6ed3239dd2 100644 --- a/hardhat/scripts/deploy.js +++ b/hardhat/scripts/deploy.js @@ -5,7 +5,7 @@ async function main() { const Token = await ethers.getContractFactory("Token"); const token = await Token.deploy(); - await token.deployed(); // Ensure the contract is deployed before accessing its address + await token.deployTransaction.wait(); // Wait for the transaction to be mined console.log("Token deployed to:", token.address); // This should print the correct address }