26 lines
753 B
JavaScript
26 lines
753 B
JavaScript
const hre = require("hardhat");
|
|
|
|
async function main() {
|
|
const cUSD_ADDRESS = "0x765DE816845861e75A25fCA122bb6898B8B1282a"; // Celo mainnet
|
|
|
|
console.log("Deploying PollCelo contract...");
|
|
|
|
const PollCelo = await hre.ethers.getContractFactory("PollCelo");
|
|
const pollCelo = await PollCelo.deploy(cUSD_ADDRESS);
|
|
|
|
await pollCelo.waitForDeployment();
|
|
|
|
const address = await pollCelo.getAddress();
|
|
console.log("PollCelo deployed to:", address);
|
|
console.log("\nAdd to .env:");
|
|
console.log(`NEXT_PUBLIC_POLL_CONTRACT_ADDRESS=${address}`);
|
|
|
|
console.log("\nVerify with:");
|
|
console.log(`npx hardhat verify --network celo ${address} ${cUSD_ADDRESS}`);
|
|
}
|
|
|
|
main().catch((error) => {
|
|
console.error(error);
|
|
process.exitCode = 1;
|
|
});
|