mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 17:33:47 +00:00
Update deploy.js
This commit is contained in:
parent
740c515089
commit
8433ccd2af
1 changed files with 9 additions and 1 deletions
|
|
@ -5,7 +5,15 @@ async function main() {
|
|||
const Token = await ethers.getContractFactory("Token");
|
||||
const token = await Token.deploy();
|
||||
|
||||
console.log("Deploy transaction hash:", token.deployTransaction.hash);
|
||||
// Log the token object to inspect its properties
|
||||
console.log("Token object:", token);
|
||||
|
||||
if (token.deployTransaction) {
|
||||
console.log("Deploy transaction hash:", token.deployTransaction.hash);
|
||||
} else {
|
||||
console.error("Deploy transaction is undefined");
|
||||
}
|
||||
|
||||
await token.deployed();
|
||||
|
||||
console.log("Token deployed to:", token.address);
|
||||
|
|
|
|||
Loading…
Reference in a new issue