Update deploy.js

This commit is contained in:
nikolaivanovj 2025-01-07 18:46:05 +02:00 committed by GitHub
parent 8433ccd2af
commit d24470ec12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
});