10grans-ng/scripts/deploy-base.ts

27 lines
674 B
TypeScript
Raw Normal View History

2023-08-20 02:47:55 +00:00
import { ethers } from "hardhat";
import "dotenv/config";
async function main() {
if (!process.env.BRIDGE_ADDRESS) throw "Bridge address not defined";
if (!process.env.ETH_TOKEN) throw "10grans Ethereum token address not defined";
const TENGRANS = await ethers.deployContract(
"TenGransBaseToken",
[
process.env.BRIDGE_ADDRESS,
process.env.ETH_TOKEN
]
);
await TENGRANS.waitForDeployment();
console.log(`Base 10grans deployed to: ${TENGRANS.target}`);
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});