forked from MyZubster-Ecosystem/myzubster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.js
More file actions
34 lines (28 loc) · 1.14 KB
/
Copy pathdeploy.js
File metadata and controls
34 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const { ethers } = require("hardhat");
async function main() {
console.log("🚀 Deploying MyZubster Token...");
// Deploy del token
const Token = await ethers.getContractFactory("MyZubsterToken");
const token = await Token.deploy();
await token.deployed();
console.log("✅ MyZubster Token deployed to:", token.address);
// Deploy del sistema di pagamento
console.log("🚀 Deploying Native Payment System...");
const Payment = await ethers.getContractFactory("NativePayment");
const payment = await Payment.deploy();
await payment.deployed();
console.log("✅ Native Payment deployed to:", payment.address);
// Whitelist del token nel sistema di pagamento
console.log("🔐 Whitelisting token in payment system...");
await payment.addWhitelistedToken(token.address);
console.log("✅ Token whitelisted!");
console.log("🎉 Deployment completed!");
console.log(`📊 Token: ${token.address}`);
console.log(`💳 Payment: ${payment.address}`);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});