Smart Contract
Contract Development
const hre = require("hardhat");
async function main() {
const [deployer] = await hre.ethers.getSigners();
console.log("Deploying from:", deployer.address);
const MyContract = await hre.ethers.getContractFactory("MyContract");
const contract = await MyContract.deploy();
await contract.deployed();
console.log("Contract deployed to:", contract.address);
}
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});Best Practices
Contract Verification
Last updated