Skip to content

Commit

Permalink
Merge pull request #119 from HausDAO/feat/new-chains
Browse files Browse the repository at this point in the history
Enable Sepolia and Base chains
  • Loading branch information
santteegt authored Dec 5, 2023
2 parents 6cb9996 + aa06429 commit b69c4e3
Show file tree
Hide file tree
Showing 43 changed files with 20,708 additions and 69 deletions.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ GNOSISSCAN_API_KEY=
POLYGONSCAN_API-KEY=
OPTIMISTICSCAN_API_KEY=
ARBISCAN_API_KEY=
BASESCAN_API_KEY=
REPORT_GAS=false
COINMARKETCAP_API_KEY=
28 changes: 3 additions & 25 deletions deploy/003_deploy_b_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,6 @@ import { DeployFunction } from 'hardhat-deploy/types';

import { getSetupAddresses } from '../src/addresses/setup';

const networkName = {
4: 'Rinkeby',
5: 'Goerli',
1: 'mainnet',
137: 'matic',
42: 'kovan',
100: 'gnosis',
42161: 'arbitrum',
10: 'optimism'
};

const networkCurrency = {
4: 'ETH',
5: 'ETH',
1: 'ETH',
137: 'matic',
42: 'ETH',
100: 'xDai',
42161: 'ETH',
10: 'ETH'
};

const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {

const { deployments, ethers, getChainId, getNamedAccounts, network } = hre;
Expand All @@ -34,8 +12,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {

const _addresses = await getSetupAddresses(chainId, network, deployments);

if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') {
console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO);
if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') {
console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO);
return;
}

Expand Down Expand Up @@ -74,7 +52,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
from: deployer,
args: [],
proxy: {
proxyContract: 'OpenZeppelinTransparentProxy',
proxyContract: 'UUPS',
methodName: 'initialize',
},
log: true,
Expand Down
8 changes: 4 additions & 4 deletions deploy/004_deploy_bv_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {

const _addresses = await getSetupAddresses(chainId, network, deployments);

if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') {
console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO);
if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') {
console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO);
return;
}

Expand All @@ -26,6 +26,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deploy } = deployments;

const baalSummoner = await deployments.get('BaalSummoner');
console.log('BaalSummoner address', baalSummoner.address);

const summonerDeeployed = await deploy('BaalAndVaultSummoner', {
contract: 'BaalAndVaultSummoner',
Expand All @@ -48,8 +49,7 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {


if (network.name !== 'hardhat') {
console.log("BaalAndVaultSummoner transferOwnership to", _addresses.DAO);
// await baalAndVaultSummoner.transferOwnership(_addresses.DAO);
console.log("BaalAndVaultSummoner transferOwnership to", _addresses.DAO);
const tx_4 = await deployments.execute('BaalAndVaultSummoner', {
from: deployer,
}, 'transferOwnership',
Expand Down
4 changes: 2 additions & 2 deletions deploy/005_deploy_bt_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const deployFn: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {

const _addresses = await getSetupAddresses(chainId, network, deployments);

if (_addresses.DAO === ethers.constants.AddressZero && network.name !== 'hardhat') {
console.log('You need to set DAO adress to transfer ownership of summoner', _addresses.DAO);
if ((!_addresses.DAO || _addresses.DAO === ethers.constants.AddressZero) && network.name !== 'hardhat') {
console.log('You need to set DAO address to transfer ownership of summoner', _addresses.DAO);
return;
}

Expand Down
1 change: 1 addition & 0 deletions deployments/base/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8453
Loading

0 comments on commit b69c4e3

Please sign in to comment.