Update deploy.js

This commit is contained in:
nikolaivanovj 2025-01-07 00:05:52 +02:00 committed by GitHub
parent 645db5eda2
commit 16647100c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,9 +5,10 @@ async function main() {
const Token = await ethers.getContractFactory("Token");
const token = await Token.deploy();
await token.deployTransaction.wait(); // Wait for the transaction to be mined
console.log("Deploy transaction hash:", token.deployTransaction.hash);
await token.deployed();
console.log("Token deployed to:", token.address); // This should print the correct address
console.log("Token deployed to:", token.address);
}
main()