Skip to content

Commit

Permalink
Update deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
wugren committed Dec 27, 2023
1 parent b0c0899 commit 63b8701
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { ethers, network } from "hardhat";
import * as fs from "node:fs";

async function main() {
const pstContract = await (await ethers.deployContract("GWTToken", [ethers.parseEther("1000000")])).waitForDeployment();
const dmcContract = await (await ethers.deployContract("DMCToken", [ethers.parseEther("1000000")])).waitForDeployment();
let dmcAddress = await dmcContract.getAddress();
console.log("DMCToken deployed to:", dmcAddress);
const pstContract = await (await ethers.deployContract("GWTToken", [dmcAddress])).waitForDeployment();

let pstAddress = await pstContract.getAddress();
console.log("GWT deployed to:", pstAddress);
Expand All @@ -11,6 +14,13 @@ async function main() {
let exchangeAddress = await exchangeContract.getAddress();
console.log("Exchange deployed to:", exchangeAddress);

const sortedScoreList = await (await ethers.deployContract("SortedScoreList")).waitForDeployment();
let sortedScoreListAddress = await sortedScoreList.getAddress();
console.log("SortedScoreList deployed to:", sortedScoreListAddress);
const publicDataStorage = await (await ethers.deployContract("PublicDataStorage", [pstAddress], {libraries: {"SortedScoreList": sortedScoreListAddress}})).waitForDeployment();
let publicDataStorageAddress = await publicDataStorage.getAddress();
console.log("PublicDataStorage deployed to:", publicDataStorageAddress);

if (network.name !== "hardhat") {
fs.writeFileSync(`${network.name}-deployed.json`, JSON.stringify({
PSTToken: pstAddress,
Expand Down

0 comments on commit 63b8701

Please sign in to comment.