Описание изменений

This commit is contained in:
2025-02-19 21:34:34 +03:00
parent 808e9aee6a
commit be08978fef
8 changed files with 68 additions and 123 deletions

View File

@@ -1,12 +1,17 @@
const hre = require("hardhat");
async function main() {
const [deployer] = await ethers.getSigners();
console.log("Начинаем деплой контракта...");
console.log('Deploying contracts with the account:', deployer.address);
// Получаем контракт
const MyContract = await hre.ethers.getContractFactory("MyContract");
// Деплоим контракт
const myContract = await MyContract.deploy();
await myContract.waitForDeployment();
const MyContract = await ethers.getContractFactory('MyContract');
const contract = await MyContract.deploy();
console.log('Contract deployed to:', contract.address);
const address = await myContract.getAddress();
console.log("Контракт развернут по адресу:", address);
}
main()