Skip to content

Commit

Permalink
fix: remove gov v2 and strategy are no longer useful (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakulstra authored Feb 19, 2024
1 parent 95389df commit 1775497
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 1,019 deletions.
4 changes: 1 addition & 3 deletions scripts/configs/abis.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import {SAFETY_MODULE} from '../generator/safetyModuleGenerator';
import {governanceConfigMainnet} from './governance/ethereum';
import {mainnetProtoV2Pool, mainnetProtoV3Pool} from './pools/ethereum';
import {mainnetProtoV3Pool} from './pools/ethereum';

export const ABI_INTERFACES = [
'IAaveGovernanceV2',
'ICollector',
'AggregatorInterface',
'IPayloadsControllerCore',
Expand Down
17 changes: 5 additions & 12 deletions scripts/generator/governanceV2Generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import {
import {ChainId} from '@bgd-labs/js-utils';

const govV2Addresses: Addresses = {
GOV: {value: '0xEC568fffba86c094cf06b22134B23074DFE2252c', type: 'IAaveGovernanceV2'},
GOV_STRATEGY: {value: '0xb7e383ef9B1E9189Fc0F71fb30af8aa14377429e', type: 'IGovernanceStrategy'},
SHORT_EXECUTOR: '0xEE56e2B3D491590B5b31738cC34d5232F378a8D5',
LONG_EXECUTOR: '0x79426A1c24B2978D90d7A5070a46C65B07bC4299',
ARC_TIMELOCK: '0xAce1d11d836cb3F51Ef658FD4D353fFb3c301218',
Expand Down Expand Up @@ -54,12 +52,10 @@ export function generateGovV2() {
`./src/AaveGovernanceV2.sol`,
prefixWithGeneratedWarning(
prefixWithPragma(
`import {IGovernanceStrategy} from './common/IGovernanceStrategy.sol';\n` +
`import {IAaveGovernanceV2, IExecutorWithTimelock} from './common/IAaveGovernanceV2.sol';\n` +
wrapIntoSolidityLibrary(
generateSolidityConstants({chainId: ChainId.mainnet, addresses: govV2Addresses}),
name,
),
wrapIntoSolidityLibrary(
generateSolidityConstants({chainId: ChainId.mainnet, addresses: govV2Addresses}),
name,
),
),
),
);
Expand All @@ -76,9 +72,6 @@ export function generateGovV2() {

return {
js: [`export * as ${name} from './${name}';`],
solidity: [
`import {AaveGovernanceV2, IGovernanceStrategy} from './AaveGovernanceV2.sol';`,
`import {${name}} from './${name}.sol';`,
],
solidity: [`import {${name}} from './${name}.sol';`],
};
}
5 changes: 1 addition & 4 deletions scripts/generator/safetyModuleGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@ export function generateSafetyModule() {

return {
js: [`export * as ${name} from './${name}';`],
solidity: [
`import {AaveGovernanceV2, IGovernanceStrategy} from './AaveGovernanceV2.sol';`,
`import {${name}} from './${name}.sol';`,
],
solidity: [`import {${name}} from './${name}.sol';`],
};
}
2 changes: 0 additions & 2 deletions src/AaveAddressBook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,5 @@ import {MiscScroll} from './MiscScroll.sol';
import {MiscPolygonZkEvm} from './MiscPolygonZkEvm.sol';
import {MiscSepolia} from './MiscSepolia.sol';
import {MiscMumbai} from './MiscMumbai.sol';
import {AaveGovernanceV2, IGovernanceStrategy} from './AaveGovernanceV2.sol';
import {AaveGovernanceV2} from './AaveGovernanceV2.sol';
import {AaveGovernanceV2, IGovernanceStrategy} from './AaveGovernanceV2.sol';
import {AaveSafetyModule} from './AaveSafetyModule.sol';
11 changes: 0 additions & 11 deletions src/AaveGovernanceV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

import {IGovernanceStrategy} from './common/IGovernanceStrategy.sol';
import {IAaveGovernanceV2, IExecutorWithTimelock} from './common/IAaveGovernanceV2.sol';

library AaveGovernanceV2 {
// https://etherscan.io/address/0xEC568fffba86c094cf06b22134B23074DFE2252c
IAaveGovernanceV2 internal constant GOV =
IAaveGovernanceV2(0xEC568fffba86c094cf06b22134B23074DFE2252c);

// https://etherscan.io/address/0xb7e383ef9B1E9189Fc0F71fb30af8aa14377429e
IGovernanceStrategy internal constant GOV_STRATEGY =
IGovernanceStrategy(0xb7e383ef9B1E9189Fc0F71fb30af8aa14377429e);

// https://etherscan.io/address/0xEE56e2B3D491590B5b31738cC34d5232F378a8D5
address internal constant SHORT_EXECUTOR = 0xEE56e2B3D491590B5b31738cC34d5232F378a8D5;

Expand Down
278 changes: 0 additions & 278 deletions src/common/IAaveGovernanceV2.sol

This file was deleted.

4 changes: 1 addition & 3 deletions src/common/IExecutorWithTimelock.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

import {IAaveGovernanceV2} from './IAaveGovernanceV2.sol';

interface IExecutorWithTimelock {
/**
* @dev emitted when a new pending admin is set
Expand Down Expand Up @@ -117,7 +115,7 @@ interface IExecutorWithTimelock {
* @return true of proposal is over grace period
**/
function isProposalOverGracePeriod(
IAaveGovernanceV2 governance,
address governance,
uint256 proposalId
) external view returns (bool);

Expand Down
Loading

0 comments on commit 1775497

Please sign in to comment.