27 lines
674 B
TypeScript
27 lines
674 B
TypeScript
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;
|
|
});
|