From bab4a2b33a1eea9db855709a1594dc46bbd8e299 Mon Sep 17 00:00:00 2001 From: markcarey Date: Wed, 2 Mar 2022 10:41:36 -0500 Subject: [PATCH] dev script tweaks --- hardhat.config.js | 9 ++++----- scripts/deploy.js | 22 +++++++++++++++------- scripts/gov.js | 3 ++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/hardhat.config.js b/hardhat.config.js index 879944b..842daa8 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -61,15 +61,14 @@ module.exports = { }, mumbai: { url: MUMBAI_API_URL, - accounts: [`0x${PRIVATE_KEY}`], - gasMultiplier: 3, - gasPrice: 1000000000 * 2 + accounts: [`0x${PRIVATE_KEY}`] + //gasMultiplier: 3, + //gasPrice: 1000000000 * 2 }, polygon: { url: POLYGON_API_URL, accounts: [`0x${PRIVATE_KEY}`], - //gasMultiplier: 3, - //gasPrice: 1000000000 * 2 + gasPrice: 1000000000 * 40 } }, etherscan: { diff --git a/scripts/deploy.js b/scripts/deploy.js index a9bea27..6a6b904 100644 --- a/scripts/deploy.js +++ b/scripts/deploy.js @@ -66,6 +66,8 @@ async function main(stf) { var salt; + if (false) { + const tokenContract = await ethers.getContractFactory("DAOToken"); const token = await tokenContract.deploy(); console.log("token deployed to address:", token.address); @@ -82,19 +84,23 @@ async function main(stf) { //return; + } //const appFactoryContract = await ethers.getContractFactory("DAOFactory"); //const appFactory = await appFactoryContract.deploy(); //console.log("appFactory deployed to address:", appFactory.address); + //return; //const factoryFactoryContract = await ethers.getContractFactory("FactoryFactory"); //const factoryFactory = await factoryFactoryContract.deploy(); //console.log("factoryFactory deployed to address:", factoryFactory.address); + + var c = {}; var result; - var v = "41"; + var v = "V1"; const tokenSalt = ethers.utils.id("TOKEN"+v); const appSalt = ethers.utils.id("APP"+v); const govSalt = ethers.utils.id("GOV"+v); @@ -136,21 +142,23 @@ async function main(stf) { } }); + const gasOptions = {"maxPriorityFeePerGas": "45000000000", "maxFeePerGas": "45000000016" }; - result = await c2factory.deploy(tokenJSON.bytecode, tokenSalt); + result = await c2factory.deploy(tokenJSON.bytecode, tokenSalt, gasOptions); + console.log(result); await result.wait(); - result = await c2factory.deploy(appJSON.bytecode, appSalt); + result = await c2factory.deploy(appJSON.bytecode, appSalt, gasOptions); await result.wait(); - result = await c2factory.deploy(govJSON.bytecode, govSalt); + result = await c2factory.deploy(govJSON.bytecode, govSalt, gasOptions); await result.wait(); - result = await c2factory.deploy(execJSON.bytecode, execSalt); + result = await c2factory.deploy(execJSON.bytecode, execSalt, gasOptions); await result.wait(); - result = await c2factory.deploy(appFactoryJSON.bytecode, factorySalt); - await sleep(25000); + result = await c2factory.deploy(appFactoryJSON.bytecode, factorySalt, gasOptions); + //await sleep(25000); await result.wait(); //const deployedAppFactory = await factoryFactory.createDaoFactory( diff --git a/scripts/gov.js b/scripts/gov.js index 34b0b83..628d9eb 100644 --- a/scripts/gov.js +++ b/scripts/gov.js @@ -131,6 +131,7 @@ const c2factoryAbi = [ const MANAGER = web3.utils.keccak256("MANAGER_ROLE"); +console.log(MANAGER); const resolverABI = [{ "inputs": [], @@ -2829,7 +2830,7 @@ async function getSome(token, eoa) { async function authFactory(app) { const owner = "0x1EB3FAA360bF1f093F5A18d21f21f13D769d044A"; - const daoFactory = "0x9b8D8513E257e98c78698260552082975844f7C4"; + const daoFactory = "0x211909B26543B4c149D97288e393Af95297bB598"; await (await signer.sendTransaction({ to: owner, value: ethers.utils.parseEther("1.0")