-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.js
More file actions
26 lines (19 loc) · 899 Bytes
/
deploy.js
File metadata and controls
26 lines (19 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const hre = require("hardhat");
async function main() {
const [deployer] = await hre.ethers.getSigners();
console.log("Deploying contracts with the account:", deployer.address);
const TuitionToken = await hre.ethers.getContractFactory("TuitionToken");
const tuitionToken = await TuitionToken.deploy(hre.ethers.utils.parseEther("1000000"));
await tuitionToken.deployed();
console.log("TuitionToken deployed to:", tuitionToken.address);
const TokenizedTuitionPayments = await hre.ethers.getContractFactory("TokenizedTuitionPayments");
const tokenizedTuitionPayments = await TokenizedTuitionPayments.deploy(tuitionToken.address);
await tokenizedTuitionPayments.deployed();
console.log("TokenizedTuitionPayments deployed to:", tokenizedTuitionPayments.address);
}
main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});