Skip to content

Commit

Permalink
dev script tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
markcarey committed Mar 2, 2022
1 parent a18c642 commit bab4a2b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
9 changes: 4 additions & 5 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
22 changes: 15 additions & 7 deletions scripts/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion scripts/gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const c2factoryAbi = [


const MANAGER = web3.utils.keccak256("MANAGER_ROLE");
console.log(MANAGER);

const resolverABI = [{
"inputs": [],
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit bab4a2b

Please sign in to comment.