mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
16 lines
No EOL
465 B
JavaScript
16 lines
No EOL
465 B
JavaScript
async function main() {
|
|
const [deployer] = await ethers.getSigners();
|
|
console.log("Deploying contracts with the account:", deployer.address);
|
|
|
|
const Greeter = await ethers.getContractFactory("Greeter");
|
|
const greeter = await Greeter.deploy("Hello, Hardhat!");
|
|
|
|
console.log("Greeter deployed to:", greeter.address);
|
|
}
|
|
|
|
main()
|
|
.then(() => process.exit(0))
|
|
.catch((error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
}); |