@vechain/vebetterdao-contracts
Version:
Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.
20 lines (19 loc) • 952 B
JavaScript
import { ethers } from "hardhat";
export async function challengesLibraries({ logOutput = false, } = {}) {
const ChallengeCoreLogic = await ethers.getContractFactory("ChallengeCoreLogic");
const ChallengeCoreLogicLib = (await ChallengeCoreLogic.deploy());
await ChallengeCoreLogicLib.waitForDeployment();
logOutput && console.log("ChallengeCoreLogic Library deployed");
const ChallengeSettlementLogic = await ethers.getContractFactory("ChallengeSettlementLogic", {
libraries: {
ChallengeCoreLogic: await ChallengeCoreLogicLib.getAddress(),
},
});
const ChallengeSettlementLogicLib = (await ChallengeSettlementLogic.deploy());
await ChallengeSettlementLogicLib.waitForDeployment();
logOutput && console.log("ChallengeSettlementLogic Library deployed");
return {
ChallengeCoreLogic: ChallengeCoreLogicLib,
ChallengeSettlementLogic: ChallengeSettlementLogicLib,
};
}