Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redeploy council #756

Merged
merged 7 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const enableMainnetForking = process.env.ENABLE_MAINNET_FORKING;
const mainnetAlchemyApiKey = process.env.MAINNET_ALCHEMY_API_KEY;
const runAllTests = process.env.RUN_ALL_TESTS;
const useJSONTestReporter = process.env.REPORT_TEST_RESULTS_AS_JSON;
const etherscanKey = process.env.ETHERSCAN_API_KEY;

if (!(process.env.NODE_OPTIONS && process.env.NODE_OPTIONS.includes('max-old-space-size'))) {
throw new Error(
Expand All @@ -47,7 +48,7 @@ export default {
enabled: !!process.env.REPORT_GAS
},
etherscan: {
apiKey: '82DJ4332MCDTMRMSVHNVWY4RDCWEF6M7B2'
apiKey: etherscanKey
},
networks: {
hardhat: {
Expand All @@ -73,7 +74,7 @@ export default {
mainnet: {
url: `https://eth-mainnet.alchemyapi.io/v2/${mainnetAlchemyApiKey}`,
accounts: privateKey ? [privateKey] : [],
gasPrice: 60000000000
gasPrice: 70000000000
}
},

Expand Down
18 changes: 10 additions & 8 deletions proposals/dao/fip_82.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { tribeCouncilPodConfig, PodCreationConfig } from '@protocol/optimisticGo
import { abi as inviteTokenABI } from '../../artifacts/@orcaprotocol/contracts/contracts/InviteToken.sol/InviteToken.json';
import { abi as timelockABI } from '../../artifacts/@openzeppelin/contracts/governance/TimelockController.sol/TimelockController.json';
import { abi as gnosisSafeABI } from '../../artifacts/contracts/pods/interfaces/IGnosisSafe.sol/IGnosisSafe.json';
import { Contract } from 'ethers';
import { Contract, Signer } from 'ethers';
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';

const validateArraysEqual = (arrayA: string[], arrayB: string[]) => {
arrayA.every((a) => expect(arrayB.map((b) => b.toLowerCase()).includes(a.toLowerCase())));
Expand All @@ -22,22 +23,23 @@ const validateArraysEqual = (arrayA: string[], arrayB: string[]) => {
// Requirement of holding Orca tokens to deploy is a slow rollout mechanism used by Orca
const transferOrcaTokens = async (
orcaERC20Address: string,
deployAddress: string,
deploySigner: SignerWithAddress,
receiver: string,
amount: number
) => {
// Mint Orca Ship tokens to deploy address, to allow to deploy contracts
const deployAddressSigner = await getImpersonatedSigner(deployAddress);
const inviteToken = new ethers.Contract(orcaERC20Address, inviteTokenABI, deployAddressSigner);
const deployerBalance = await inviteToken.balanceOf(deployAddress);
const inviteToken = new ethers.Contract(orcaERC20Address, inviteTokenABI, deploySigner);
const deployerBalance = await inviteToken.balanceOf(deploySigner.address);
console.log('Orca balance: ', deployerBalance);

if (deployerBalance.lt(amount)) {
// In test environment, mint tokens to deployer
const priviledgedOrcaMinter = '0x2149A222feD42fefc3A120B3DdA34482190fC666';
const priviledgedSigner = await getImpersonatedSigner(priviledgedOrcaMinter);
await inviteToken.connect(priviledgedSigner).mint(deployAddress, amount);
await inviteToken.connect(priviledgedSigner).mint(deploySigner.address, amount);
}
await inviteToken.transfer(receiver, amount);
const transferTx = await inviteToken.transfer(receiver, amount);
await transferTx.wait();
};

const fipNumber = '82';
Expand Down Expand Up @@ -71,7 +73,7 @@ const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses: Named
);
await podAdminGateway.deployTransaction.wait();
logging && console.log(`Deployed PodAdminGateway at ${podAdminGateway.address}`);
await transferOrcaTokens(addresses.orcaShipToken, deployAddress, podFactory.address, 1);
await transferOrcaTokens(addresses.orcaShipToken, deploySigner, podFactory.address, 1);

// 4. Create TribalCouncil and Protocol Tier pods
const tribalCouncilPod: PodCreationConfig = {
Expand Down
10 changes: 5 additions & 5 deletions proposals/description/fip_82.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,17 @@ const fip_82: ProposalDescription = {
values: '0',
method: 'batchAddPodMember(uint256 _podId,address[] memory _members)',
arguments: [
'24', // TODO: Update to correct TribalCouncil ID once pod is deployed
'25',
[
'0xc8eefb8b3d50ca87Da7F99a661720148acf97EfA', // TODO: Complete with real member addresses
'0xc8eefb8b3d50ca87Da7F99a661720148acf97EfA',
'0x72b7448f470D07222Dbf038407cD69CC380683F3',
'0xA6D08774604d6Da7C96684ca6c4f61f89c4e5b96',
'0xe0ac4559739bD36f0913FB0A3f5bFC19BCBaCD52',
'0xC2138f77E97A9Ac0A4bC26F42D80D29D1a091866',
'0x9f5e6F58CC8823D3c022AeBE3942EeF689E9AcD9',
'0xaB339ae6eab3C3CF4f5885E56F7B49391a01DDA6',
'0xd90E9181B20D8D1B5034d9f5737804Da182039F6',
'0x0000000000000000000000000000000000000015'
'0x7671f0615B1764fb4bf4b8dF06B7338843f99678'
]
],
description: 'Add designated members to the Tribal Council'
Expand All @@ -150,7 +150,7 @@ const fip_82: ProposalDescription = {
values: '0',
method: 'batchRemovePodMember(uint256 _podId, address[] memory)',
arguments: [
'24', // TODO: Update to correct TribalCouncil ID once pod is deployed
'25',
[
'0x0000000000000000000000000000000000000004',
'0x0000000000000000000000000000000000000005',
Expand All @@ -169,7 +169,7 @@ const fip_82: ProposalDescription = {
target: 'podAdminGateway',
values: '0',
method: 'lockMembershipTransfers(uint256 _podId)',
arguments: ['24'],
arguments: ['25'],
description: 'Lock TribalCouncil membership transfers'
}
],
Expand Down
10 changes: 5 additions & 5 deletions protocol-configuration/mainnetAddresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2018,17 +2018,17 @@ const MainnetAddresses: MainnetAddresses = {
},
podExecutor: {
artifactName: 'PodExecutor',
address: '0x489BeB7b2829D0e57f1776899D561afc1bBeef11',
address: '0x99d8b669F48A708f7C0373AF6CE31F0726ab6CaD',
category: AddressCategory.Governance
},
podAdminGateway: {
artifactName: 'PodAdminGateway',
address: '0xf14DccfB071672F1394BaA58d136D94dD1cEDc85',
address: '0xDDe8AA537c5b289De9cede462E6F0ec3a3a99e39',
category: AddressCategory.Governance
},
podFactory: {
artifactName: 'PodFactory',
address: '0xeF9f961266Ad9Bb46396577A77234dBFEb4dAac7',
address: '0x4B2c8894D29d05dbc0d5A1CE23535be08d844819',
category: AddressCategory.Governance
},
governanceMetadataRegistry: {
Expand All @@ -2043,12 +2043,12 @@ const MainnetAddresses: MainnetAddresses = {
},
tribalCouncilTimelock: {
artifactName: 'TimelockController',
address: '0x9F80E03985303eB8b2ABC031Cb82716D7913f531',
address: '0xe0C7DE94395B629860Cbb3c42995F300F56e6d7a',
category: AddressCategory.Governance
},
tribalCouncilSafe: {
artifactName: 'unknown',
address: '0xdb6236E5363aBdeb807198e820DD5CC04BfC8dDd',
address: '0x2EC598d8e3DF35E5D6F13AE2f05a7bB2704e92Ea',
category: AddressCategory.Governance
},
roleBastion: {
Expand Down
10 changes: 5 additions & 5 deletions protocol-configuration/optimisticGovernance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export type PodCreationConfig = {
};

export const tribalCouncilMembers = [
'0xc8eefb8b3d50ca87Da7F99a661720148acf97EfA', // TODO: Complete with real member addresses
'0xc8eefb8b3d50ca87Da7F99a661720148acf97EfA',
'0x72b7448f470D07222Dbf038407cD69CC380683F3',
'0xA6D08774604d6Da7C96684ca6c4f61f89c4e5b96',
'0xe0ac4559739bD36f0913FB0A3f5bFC19BCBaCD52',
'0xC2138f77E97A9Ac0A4bC26F42D80D29D1a091866',
'0x9f5e6F58CC8823D3c022AeBE3942EeF689E9AcD9',
'0xaB339ae6eab3C3CF4f5885E56F7B49391a01DDA6',
'0xd90E9181B20D8D1B5034d9f5737804Da182039F6',
'0x0000000000000000000000000000000000000015'
'0x7671f0615B1764fb4bf4b8dF06B7338843f99678'
];

export const placeHolderCouncilMembers = [
Expand All @@ -48,12 +48,12 @@ export const MIN_TIMELOCK_DELAY = 86400; // 1 day
export const tribeCouncilPodConfig: PodConfig = {
members: tribalCouncilMembers,
threshold: 5,
label: '0xcc74924992a4b3a8d464650443c1d35252c3c4eacfcae441e1a646c194eda9c9', // tribalcouncil
ensString: 'tribalcouncil.pod.xyz',
label: '0xbbbb0f283d36ab6734712e97b09b54eecf6cdb83ad20efc8b1718c7fe38cb0b8', // tribecouncil
ensString: 'tribecouncil.pod.xyz',
imageUrl: '',
minDelay: 86400 * 4, // 4 days
numMembers: tribalCouncilMembers.length,
placeHolderMembers: placeHolderCouncilMembers
};

export const TRIBAL_COUNCIL_POD_ID = 24;
export const TRIBAL_COUNCIL_POD_ID = 25;