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
8433ccd2af
commit
d24470ec12
1 changed files with 4 additions and 5 deletions
|
|
@ -8,20 +8,19 @@ async function main() {
|
||||||
// Log the token object to inspect its properties
|
// Log the token object to inspect its properties
|
||||||
console.log("Token object:", token);
|
console.log("Token object:", token);
|
||||||
|
|
||||||
|
// Check if the deployTransaction is available
|
||||||
if (token.deployTransaction) {
|
if (token.deployTransaction) {
|
||||||
console.log("Deploy transaction hash:", token.deployTransaction.hash);
|
console.log("Deploy transaction hash:", token.deployTransaction.hash);
|
||||||
|
await token.deployTransaction.wait(); // Wait for the deployment transaction to be mined
|
||||||
|
console.log("Token deployed to:", token.address);
|
||||||
} else {
|
} else {
|
||||||
console.error("Deploy transaction is undefined");
|
console.error("Deploy transaction is undefined");
|
||||||
}
|
}
|
||||||
|
|
||||||
await token.deployed();
|
|
||||||
|
|
||||||
console.log("Token deployed to:", token.address);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
.then(() => process.exit(0))
|
.then(() => process.exit(0))
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error);
|
console.error("Error:", error);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue