For the complete documentation index, see llms.txt. This page is also available as Markdown.

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