mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
Update deploy.js
This commit is contained in:
parent
645db5eda2
commit
16647100c6
1 changed files with 3 additions and 2 deletions
|
|
@ -5,9 +5,10 @@ async function main() {
|
||||||
const Token = await ethers.getContractFactory("Token");
|
const Token = await ethers.getContractFactory("Token");
|
||||||
const token = await Token.deploy();
|
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()
|
main()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue