import hre from "hardhat";

 

async function main() {

  // جلب الحساب الأول من Hardhat runtime

  const [deployer] = await hre.getSigners();

 

  // طباعة عنوان الحساب ورصيده

  console.log("Deploying contract with account:", await deployer.getAddress());

  const balance = await deployer.getBalance();

  console.log("Account balance:", balance.toString());

 

  // الحصول على Factory للعقد HighestCoin

  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;

});


masry500

طابت أوقاتكم وبالله التوفيق

  • Currently 0/5 Stars.
  • 1 2 3 4 5
0 تصويتات / 2 مشاهدة
نشرت فى 14 يناير 2026 بواسطة masry500

ساحة النقاش

عدد زيارات الموقع

122,858