update starter view

This commit is contained in:
owen05
2022-02-18 21:12:18 +08:00
parent 999242a316
commit a3d788f87e
7 changed files with 148 additions and 6 deletions

View File

@@ -4,6 +4,9 @@ const file = fs.createWriteStream("../deploy-starter.txt", { 'flags': 'a' });
let logger = new console.Console(file, file);
const { GetConfig } = require("../configAdapter.js")
const UserQuota = artifacts.require("UserQuota");
const UserQuotaFactory = artifacts.require("UserQuotaFactory");
const DODOStarterProxy = artifacts.require("DODOStarterProxy");
const DODOStarterFactory = artifacts.require("DODOStarterFactory");
const FairFunding = artifacts.require("FairFunding");
@@ -17,6 +20,7 @@ module.exports = async (deployer, network, accounts) => {
let CloneFactoryAddress = CONFIG.CloneFactory;
let WETHAddress = CONFIG.WETH;
if (DODOApproveProxyAddress == "" || CloneFactoryAddress == "" || WETHAddress == "") return;
let FairFundingTemplate = CONFIG.FairFunding;
@@ -24,8 +28,39 @@ module.exports = async (deployer, network, accounts) => {
let DODOStarterFactoryAddress = CONFIG.DODOStarterFactory;
let DODOStarterProxyAddress = CONFIG.DODOStarterProxy;
let UserQuotaAddress = CONFIG.UserQuota;
let UserQuotaFactoryAddress = CONFIG.UserQuotaFactory;
let multiSigAddress = CONFIG.multiSigAddress;
if (deploySwitch.Quota) {
logger.log("====================================================");
logger.log("network type: " + network);
logger.log("Deploy time: " + new Date().toLocaleString());
logger.log("Deploy type: QuotaFactory");
if (UserQuotaAddress == "") {
await deployer.deploy(UserQuota);
UserQuotaAddress = UserQuota.address;
logger.log("UserQuotaAddress: ", UserQuotaAddress);
}
if (UserQuotaFactoryAddress == "") {
await deployer.deploy(
UserQuotaFactory,
CloneFactoryAddress,
UserQuotaAddress
);
UserQuotaFactoryAddress = UserQuotaFactory.address;
logger.log("UserQuotaFactoryAddress: ", UserQuotaFactoryAddress);
const instance = await UserQuotaFactory.at(UserQuotaFactoryAddress);
var tx = await instance.initOwner(multiSigAddress);
logger.log("Init UserQuotaFactory Tx:", tx.tx);
}
}
if (deploySwitch.STARTER) {
logger.log("====================================================");
logger.log("network type: " + network);