import { HardhatUserConfig } from "hardhat/config";
const PRIVATE_KEY = "ضع_المفتاح_الخاص_هنا_بدون_0x";
const config: HardhatUserConfig = {
solidity: "0.8.20",
networks: {
polygon: {
url: "https://polygon-rpc.com",
accounts: [PRIVATE_KEY],
},
},
};
export default config;
Xxxxxxxxxxx deploy
import hre from "hardhat";
async function main() { const HighestCoin = await hre.ethers.getContractFactory("HighestCoin"); const contract = await HighestCoin.deploy();
await contract.waitForDeployment();
console.log("HighestCoin deployed to:", await contract.getAddress());}
main().catch((error) => { console.error(error); process.exitCode = 1;});



ساحة النقاش