// Script de déploiement du contrat Voting const hre = require("hardhat"); async function main() { const [deployer] = await hre.ethers.getSigners(); console.log("Deploying contracts with the account:", deployer.address); const Voting = await hre.ethers.getContractFactory("Voting"); const voting = await Voting.deploy(deployer.address); const address = await voting.getAddress() console.log("Voting contract deployed to:", address); } main() .then(() => process.exit(0)) .catch((error) => { console.error(error); process.exit(1); });