This commit is contained in:
owen05
2021-03-15 20:10:38 +08:00
parent 4ef8fd9cad
commit abe9919a01
14 changed files with 106 additions and 1418 deletions

View File

@@ -14,6 +14,7 @@ const FeeRateImpl = artifacts.require("FeeRateImpl");
const WETH9 = artifacts.require("WETH9");
const DODOToken = artifacts.require("DODOToken");
const UpCrowdPoolingFactory = artifacts.require("UpCrowdPoolingFactory");
const CpFactory = artifacts.require("CrowdPoolingFactory");
module.exports = async (deployer, network, accounts) => {
let CONFIG = GetConfig(network, accounts)
@@ -57,6 +58,26 @@ module.exports = async (deployer, network, accounts) => {
logger.log("Init UpCpFactory Tx:", tx.tx);
}
if (deploySwitch.CPFactory) {
logger.log("====================================================");
logger.log("network type: " + network);
logger.log("Deploy time: " + new Date().toLocaleString());
logger.log("Deploy type: CrowdPoolingFactory");
await deployer.deploy(
CpFactory,
CloneFactoryAddress,
CpTemplateAddress,
DvmFactoryAddress,
defaultMaintainer,
DefaultMtFeeRateAddress,
DefaultPermissionAddress
);
logger.log("CrowdPoolingFactory address: ", CpFactory.address);
const cpFactoryInstance = await CpFactory.at(CpFactory.address);
var tx = await cpFactoryInstance.initOwner(multiSigAddress);
logger.log("Init CpFactory Tx:", tx.tx);
}
if(deploySwitch.DVM) {
await deployer.deploy(DvmTemplate);
DvmTemplateAddress = DvmTemplate.address;