22 lines
683 B
TypeScript
22 lines
683 B
TypeScript
import { ethers } from "hardhat";
|
|
|
|
async function main() {
|
|
const [deployer] = await ethers.getSigners();
|
|
console.log("Deploying contracts with the account:", deployer.address);
|
|
|
|
const Token = await ethers.getContractFactory("MagnaToken");
|
|
const token = await Token.deploy();
|
|
console.log("Token address:", token.address);
|
|
|
|
const Airdrop = await ethers.getContractFactory("Airdrop");
|
|
const airdrop = await Airdrop.deploy(token.address);
|
|
console.log("Airdrop address:", airdrop.address);
|
|
}
|
|
|
|
// 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;
|
|
});
|