Skip to content

Commit

Permalink
Merge pull request #675 from fei-protocol/release/2.5.2
Browse files Browse the repository at this point in the history
Release/2.5.2
  • Loading branch information
ElliotFriedman authored Apr 15, 2022
2 parents 2bee690 + 24b9c02 commit e0c2b53
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 10 deletions.
44 changes: 44 additions & 0 deletions proposals/dao/fip_94.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import hre, { ethers, artifacts } from 'hardhat';
import { expect } from 'chai';
import {
DeployUpgradeFunc,
NamedAddresses,
SetupUpgradeFunc,
TeardownUpgradeFunc,
ValidateUpgradeFunc
} from '@custom-types/types';

const fipNumber = '94'; // Change me!

// Do any deployments
// This should exclusively include new contract deployments
const deploy: DeployUpgradeFunc = async (deployAddress: string, addresses: NamedAddresses, logging: boolean) => {
console.log(`No deploy actions for fip${fipNumber}`);
return {
// put returned contract objects here
};
};

// Do any setup necessary for running the test.
// This could include setting up Hardhat to impersonate accounts,
// ensuring contracts have a specific state, etc.
const setup: SetupUpgradeFunc = async (addresses, oldContracts, contracts, logging) => {
console.log(`No setup actions for fip${fipNumber}`);
};

// Tears down any changes made in setup() that need to be
// cleaned up before doing any validation checks.
const teardown: TeardownUpgradeFunc = async (addresses, oldContracts, contracts, logging) => {
console.log(`No actions to complete in teardown for fip${fipNumber}`);
};

// Run any validations required on the fip using mocha or console logging
// IE check balances, check state of contracts, etc.
const validate: ValidateUpgradeFunc = async (addresses, oldContracts, contracts, logging) => {
// Verify Rari timelock does not have GOVERN_ROLE role
const core = contracts.core;
const hasGovRole = await core.hasRole(ethers.utils.id('GOVERN_ROLE'), addresses.rariTimelock);
expect(hasGovRole).to.equal(false);
};

export { deploy, setup, teardown, validate };
21 changes: 21 additions & 0 deletions proposals/description/fip_94.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ProposalDescription } from '@custom-types/types';

const fip_94: ProposalDescription = {
title: 'FIP-94: Remove GOVERN_ROLE role from Rari timelock',
commands: [
{
target: 'core',
values: '0',
method: 'revokeRole(bytes32,address)',
arguments: [
'0x899bd46557473cb80307a9dabc297131ced39608330a2d29b2d52b660c03923e', // GOVERN_ROLE
'{rariTimelock}'
],
description: 'Revoke GOVERN_ROLE role from Rari timelock'
}
],
description: `
This FIP revokes the GOVERN_ROLE role from the Rari timelock as a safety mechanism.`
};

export default fip_94;
2 changes: 1 addition & 1 deletion protocol-configuration/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const permissions = {
'balancerDepositFeiWeth'
],
BURNER_ROLE: [],
GOVERN_ROLE: ['core', 'feiDAOTimelock', 'rariTimelock'],
GOVERN_ROLE: ['core', 'feiDAOTimelock'],
PCV_CONTROLLER_ROLE: [
'feiDAOTimelock',
'ratioPCVControllerV2',
Expand Down
19 changes: 10 additions & 9 deletions test/integration/proposals_config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { ProposalCategory, ProposalsConfigMap } from '@custom-types/types';

// import fip_xx_proposal from '@proposals/description/fip_xx';
import fip_94 from '@proposals/description/fip_94';

const proposals: ProposalsConfigMap = {
/*
fip_xx : {
deploy: true, // deploy flag for whether to run deploy action during e2e tests or use mainnet state
skipDAO: false, // whether or not to simulate proposal in DAO
totalValue: 0, // amount of ETH to send to DAO execution
proposal: fip_xx_proposal // full proposal file, imported from '@proposals/description/fip_xx.ts'
}
*/
fip_94: {
deploy: false,
proposalId: null,
affectedContractSignoff: ['rariTimelock'],
deprecatedContractSignoff: [],
category: ProposalCategory.DAO,
totalValue: 0,
proposal: fip_94
}
};

export default proposals;

0 comments on commit e0c2b53

Please sign in to comment.