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
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
|
||||
console.log("Token object:", token);
|
||||
|
||||
// Check if the deployTransaction is available
|
||||
if (token.deployTransaction) {
|
||||
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 {
|
||||
console.error("Deploy transaction is undefined");
|
||||
}
|
||||
|
||||
await token.deployed();
|
||||
|
||||
console.log("Token deployed to:", token.address);
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
console.error("Error:", error);
|
||||
process.exit(1);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue