import { ethers } from "hardhat"; async function main() { // Get the deployer's address const [deployer] = await ethers.getSigners(); console.log("Deploying creator economy with account:", deployer.address); // Factory address (update with your deployed factory address) const FACTORY_ADDRESS = "0x..."; // UPDATE THIS // Get the Factory contract const Factory = await ethers.getContractFactory("Factory"); const factory = Factory.attach(FACTORY_ADDRESS); // Parameters for the creator economy const tokenName = "MyBandToken"; const tokenSymbol = "BAND"; const nftName = "MyBand NFTs"; const nftSymbol = "MBNFT"; // Base token address (e.g., USDC on Sepolia) // Sepolia USDC: 0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d861E1 // Or use WETH: 0x7b79995e5f793a07bc00c21412e50ecae098e7f9 const baseToken = "0x94a9D9AC8a22534E3FaCa9F4e7F2E2cf85d861E1"; console.log("\nCreating economy:"); console.log("- Token Name:", tokenName); console.log("- Token Symbol:", tokenSymbol); console.log("- NFT Name:", nftName); console.log("- NFT Symbol:", nftSymbol); console.log("- Base Token:", baseToken); // Create the economy const tx = await factory.createEconomy( tokenName, tokenSymbol, nftName, nftSymbol, baseToken ); console.log("\nTransaction sent:", tx.hash); const receipt = await tx.wait(); console.log("Transaction confirmed!"); // Get the economy details const economy = await factory.getEconomy(deployer.address); console.log("\n✅ Creator Economy Created:"); console.log("- Creator Token:", economy[0]); console.log("- Liquidity Vault:", economy[1]); console.log("- NFT Collection:", economy[2]); } main() .then(() => process.exit(0)) .catch((error) => { console.error(error); process.exit(1); });