UNPKG

@vechain/vebetterdao-contracts

Version:

Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.

43 lines (42 loc) 1.97 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.xAllocationVotingLibraries = void 0; const hardhat_1 = require("hardhat"); const xAllocationVotingLibraries = async (logOutput = false) => { const deploy = async (name) => { const Factory = await hardhat_1.ethers.getContractFactory(name); const lib = await Factory.deploy(); await lib.waitForDeployment(); logOutput && console.log(`${name} Library deployed`); return lib; }; const AutoVotingLogic = await deploy("AutoVotingLogic"); const ExternalContractsUtils = await deploy("ExternalContractsUtils"); const VotingSettingsUtils = await deploy("VotingSettingsUtils"); const VotesUtils = await deploy("VotesUtils"); const VotesQuorumFractionUtils = await deploy("VotesQuorumFractionUtils"); const RoundEarningsSettingsUtils = await deploy("RoundEarningsSettingsUtils"); const RoundFinalizationUtils = await deploy("RoundFinalizationUtils"); const RoundsStorageUtils = await deploy("RoundsStorageUtils"); const FreshnessUtils = await deploy("FreshnessUtils"); // RoundVotesCountingUtils depends on FreshnessUtils const RoundVotesCountingUtilsFactory = await hardhat_1.ethers.getContractFactory("RoundVotesCountingUtils", { libraries: { FreshnessUtils: await FreshnessUtils.getAddress() }, }); const RoundVotesCountingUtils = await RoundVotesCountingUtilsFactory.deploy(); await RoundVotesCountingUtils.waitForDeployment(); logOutput && console.log("RoundVotesCountingUtils Library deployed"); return { AutoVotingLogic, ExternalContractsUtils, VotingSettingsUtils, VotesUtils, VotesQuorumFractionUtils, RoundEarningsSettingsUtils, RoundFinalizationUtils, RoundsStorageUtils, RoundVotesCountingUtils, FreshnessUtils, }; }; exports.xAllocationVotingLibraries = xAllocationVotingLibraries;