Skip to content

Commit 8433ccd

Browse files
Update deploy.js
1 parent 740c515 commit 8433ccd

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

hardhat/scripts/deploy.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ async function main() {
55
const Token = await ethers.getContractFactory("Token");
66
const token = await Token.deploy();
77

8-
console.log("Deploy transaction hash:", token.deployTransaction.hash);
8+
// Log the token object to inspect its properties
9+
console.log("Token object:", token);
10+
11+
if (token.deployTransaction) {
12+
console.log("Deploy transaction hash:", token.deployTransaction.hash);
13+
} else {
14+
console.error("Deploy transaction is undefined");
15+
}
16+
917
await token.deployed();
1018

1119
console.log("Token deployed to:", token.address);

0 commit comments

Comments
 (0)