mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 01:43:47 +00:00
19 lines
512 B
JavaScript
19 lines
512 B
JavaScript
async function main() {
|
|
const [deployer] = await ethers.getSigners();
|
|
console.log("Deploying contracts with the account:", deployer.address);
|
|
|
|
const Token = await ethers.getContractFactory("Token");
|
|
const token = await Token.deploy();
|
|
|
|
console.log("Deploy transaction hash:", token.deployTransaction.hash);
|
|
await token.deployed();
|
|
|
|
console.log("Token deployed to:", token.address);
|
|
}
|
|
|
|
main()
|
|
.then(() => process.exit(0))
|
|
.catch((error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
});
|