const hre = require("hardhat"); async function main() { const [deployer] = await hre.ethers.getSigners(); const creator = process.env.YOUR_WALLET || deployer.address; const Trigger = await hre.ethers.getContractFactory("Trigger"); const trigger = await Trigger.deploy(creator); await trigger.waitForDeployment(); console.log("Trigger:", await trigger.getAddress()); const Treasury = await hre.ethers.getContractFactory("Treasury"); const treasury = await Treasury.deploy(await trigger.getAddress()); await treasury.waitForDeployment(); console.log("Treasury (DAO):", await treasury.getAddress()); const Splitter = await hre.ethers.getContractFactory("RevenueSplitter"); const splitter = await Splitter.deploy(await treasury.getAddress(), creator); await splitter.waitForDeployment(); console.log("Splitter (10% to you):", await splitter.getAddress()); // Update env: DAO_TREASURY=... } main();