mirror of
https://github.com/rjNemo/wave-portal
synced 2026-06-06 09:06:39 +00:00
24 lines
670 B
JavaScript
24 lines
670 B
JavaScript
const main = async () => {
|
|
const [deployer] = await hre.ethers.getSigners();
|
|
const accountBalance = await deployer.getBalance();
|
|
|
|
console.log(`Deploying contracts with address: ${deployer.address}`);
|
|
console.log(`Account balance: ${accountBalance.toString()}`);
|
|
|
|
const Token = await hre.ethers.getContractFactory("WavePortal");
|
|
const portal = await Token.deploy({ value: hre.ethers.utils.parseEther("0.01") });
|
|
await portal.deployed();
|
|
console.log("WavePortal address: ", portal.address);
|
|
};
|
|
|
|
const runMain = async () => {
|
|
try {
|
|
await main();
|
|
process.exit(0);
|
|
} catch (error) {
|
|
console.log(error);
|
|
process.exit(1);
|
|
}
|
|
};
|
|
|
|
runMain();
|