Skip to content

Commit

Permalink
Merge branch 'develop' into feat/buyback_newpool
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeysantoro committed Dec 24, 2021
2 parents 9144dd1 + 2dc6a90 commit 35db9a9
Show file tree
Hide file tree
Showing 10 changed files with 995 additions and 983 deletions.
1,805 changes: 906 additions & 899 deletions contract-addresses/mainnetAddresses.ts

Large diffs are not rendered by default.

51 changes: 0 additions & 51 deletions contract-addresses/permissions.json

This file was deleted.

31 changes: 31 additions & 0 deletions contract-addresses/permissions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
export const permissions = {
MINTER_ROLE: [
'bondingCurve',
'uniswapPCVDeposit',
'feiDAOTimelock',
'daiBondingCurve',
'dpiUniswapPCVDeposit',
'pcvEquityMinter',
'collateralizationOracleKeeper',
'optimisticMinter',
'agEurAngleUniswapPCVDeposit',
'tribeRagequit',
'daiPSM'
],
BURNER_ROLE: ['ethReserveStabilizer'],
GOVERN_ROLE: ['core', 'timelock', 'feiDAOTimelock'],
PCV_CONTROLLER_ROLE: [
'feiDAOTimelock',
'ratioPCVController',
'aaveEthPCVDripController',
'compoundEthPCVDripController',
'pcvGuardian',
'daiPCVDripController'
],
GUARDIAN_ROLE: ['multisig', 'pcvGuardian'],
ORACLE_ADMIN_ROLE: ['collateralizationOracleGuardian', 'optimisticTimelock'],
SWAP_ADMIN_ROLE: ['pcvEquityMinter'],
BALANCER_MANAGER_ADMIN_ROLE: [],
PSM_ADMIN_ROLE: [],
TRIBAL_CHIEF_ADMIN_ROLE: ['optimisticTimelock']
};
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"chai": "^4.3.4",
"dotenv": "^10.0.0",
"hardhat": "^2.8.0",
"hardhat-contract-sizer": "^2.2.0",
"hardhat-contract-sizer": "^2.3.0",
"hardhat-gas-reporter": "^1.0.6",
"merkletreejs": "^0.2.27",
"string-template": "^1.0.0"
Expand All @@ -61,7 +61,7 @@
"@typechain/hardhat": "^2.3.0",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.1",
"@types/node": "^17.0.2",
"@typescript-eslint/eslint-plugin": "^4.31.2",
"@typescript-eslint/parser": "^4.31.2",
"chai-bn": "^0.3.0",
Expand Down
37 changes: 37 additions & 0 deletions scripts/sortAddresses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

import addresses from '../contract-addresses/mainnetAddresses';

const categories = {
Core: 0,
Governance: 1,
Peg: 2,
PCV: 3,
Collateralization: 4,
Oracle: 5,
Keeper: 6,
Rewards: 7,
FeiRari: 8,
External: 9,
Deprecated: 10,
TBD: 11
}

const result =
Object.keys(addresses)
.sort((a, b) =>
{
let order = categories[addresses[a].category] - categories[addresses[b].category];
if (order === 0) {
order = a.localeCompare(b);
}
return order;
})
.reduce(
(_sortedObj, key) => ({
..._sortedObj,
[key]: addresses[key]
}),
{}
);

console.log(result);
6 changes: 3 additions & 3 deletions scripts/utils/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ export async function execProposal(voterAddress, governorAlphaAddress, totalValu
console.log('Vote already began');
}

await governor.connect(signer).castVote(proposalNo, 1);
console.log('Casted vote');

proposal = await governor.proposals(proposalNo);
const { endBlock } = proposal;

// Advance to after vote completes and queue the transaction
if (toBN(await time.latestBlock()).lt(toBN(endBlock))) {
await governor.connect(signer).castVote(proposalNo, 1);
console.log('Casted vote');

console.log(`Advancing To: ${endBlock}`);
await time.advanceBlockTo(endBlock);

Expand Down
12 changes: 0 additions & 12 deletions test/integration/proposals_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,6 @@ const proposals: ProposalsConfigMap = {
proposal: fip_xx_proposal // full proposal file, imported from '@proposals/description/fip_xx.ts'
}
*/
buyback_newpool: {
deploy: false,
skipDAO: false,
totalValue: 0,
proposal: buyback_newpool
},
merger: {
deploy: false,
skipDAO: false,
totalValue: 0,
proposal: merger_proposal
}
};

export default proposals;
2 changes: 1 addition & 1 deletion test/integration/setup/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import permissions from '@addresses/permissions.json';
import { permissions } from '@addresses/permissions';
import { getAllContractAddresses, getAllContracts } from './loadContracts';
import {
Config,
Expand Down
2 changes: 1 addition & 1 deletion test/integration/tests/merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('e2e-merger', function () {
doLogging && console.log(`Environment loaded.`);
});

describe('TribeRagequit', async function () {
describe.skip('TribeRagequit', async function () {
const guardianBalance = '18903018000000000000000000';

it('ngmi', async function () {
Expand Down

0 comments on commit 35db9a9

Please sign in to comment.