File size: 548 Bytes
ddcff90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const hre = require("hardhat");

async function main() {
  const treasuryAddr = process.env.DAO_TREASURY;
  const usdc = await hre.ethers.getContractAt("ERC20", "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913");
  const amount = hre.ethers.parseUnits("1000", 6);  // $1000

  // Approve & fund (run with your private key)
  await usdc.approve(treasuryAddr, amount);
  const treasury = await hre.ethers.getContractAt("Treasury", treasuryAddr);
  await treasury.fund(amount);
  console.log("Funded $1000 → 1000 votes earned!");
}

main();