Hardhat pairs a JS/TS test suite with ethers. Deployment scripts fetch a factory, deploy, wait for confirmations, then verify the source on the block explorer.
const f = await ethers.getContractFactory("SimpleStaking");
const c = await f.deploy(rewardRate);
await c.waitForDeployment();
console.log(await c.getAddress());Keep private keys in environment variables, never in the repo, and always deploy to a testnet such as Base Sepolia first.