5.9 Deploying Contracts via Script
Create a deployment script:
async function main() {
const Contract = await ethers.getContractFactory("FreCxStorage");
const contract = await Contract.deploy();
await contract.deployed();
console.log("Contract deployed to:", contract.address);
}
main();Run deployment:
npx hardhat run scripts/deploy.js --network frecx



Last updated