Skip to content

Commit d24470e

Browse files
Update deploy.js
1 parent 8433ccd commit d24470e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

hardhat/scripts/deploy.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,19 @@ async function main() {
88
// Log the token object to inspect its properties
99
console.log("Token object:", token);
1010

11+
// Check if the deployTransaction is available
1112
if (token.deployTransaction) {
1213
console.log("Deploy transaction hash:", token.deployTransaction.hash);
14+
await token.deployTransaction.wait(); // Wait for the deployment transaction to be mined
15+
console.log("Token deployed to:", token.address);
1316
} else {
1417
console.error("Deploy transaction is undefined");
1518
}
16-
17-
await token.deployed();
18-
19-
console.log("Token deployed to:", token.address);
2019
}
2120

2221
main()
2322
.then(() => process.exit(0))
2423
.catch((error) => {
25-
console.error(error);
24+
console.error("Error:", error);
2625
process.exit(1);
2726
});

0 commit comments

Comments
 (0)