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
2e552925b0
commit
645db5eda2
1 changed files with 1 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ 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.deployed(); // Ensure the contract is deployed before accessing its address
|
await token.deployTransaction.wait(); // Wait for the transaction to be mined
|
||||||
|
|
||||||
console.log("Token deployed to:", token.address); // This should print the correct address
|
console.log("Token deployed to:", token.address); // This should print the correct address
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue