Skip to content
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
2 changes: 1 addition & 1 deletion lib/aave-helpers
Submodule aave-helpers updated 83 files
+3 −3 .github/dependabot.yml
+11 −41 .github/workflows/merge-main.yml
+4 −2 .gitignore
+7 −0 .prettierignore
+145 −165 CHANGELOG.md
+1 −1 diffs/adi_test_adi_diffs_before_adi_test_adi_diffs_after.md
+18 −3 diffs/default_before_default_after.md
+8 −8 diffs/preTestV2RatesUpdates_postTestV2RatesUpdates.md
+2 −574 diffs/zksync_before_zksync_after.md
+17 −7 foundry.toml
+1 −1 lib/aave-address-book
+1 −1 lib/forge-std
+2,178 −0 package-lock.json
+3 −3 package.json
+3 −8 scripts/AaveSwapperDeployment.s.sol
+0 −22 scripts/AaveWstethWithdrawerDeployment.s.sol
+1 −1 scripts/DeployBridges.s.sol
+0 −7 scripts/FreezingStewards.s.sol
+0 −12 scripts/RiskStewards.s.sol
+3 −2 scripts/V2RateStrategyFactory.s.sol
+0 −4 src/ChainIds.sol
+8 −11 src/CollectorUtils.sol
+16 −2 src/CommonTestBase.sol
+57 −4 src/GovV3Helpers.sol
+1 −1 src/IpfsUtils.sol
+6 −5 src/ProtocolV2TestBase.sol
+355 −41 src/ProtocolV3TestBase.sol
+0 −114 src/asset-manager/AaveWstethWithdrawer.sol
+0 −14 src/asset-manager/Common.sol
+0 −41 src/asset-manager/LSDLiquidityGaugeManager.sol
+0 −192 src/asset-manager/README.md
+0 −42 src/asset-manager/StrategicAssetsManager.sol
+0 −224 src/asset-manager/VeTokenManager.sol
+0 −72 src/asset-manager/VlTokenManager.sol
+ src/asset-manager/images/AaveWstethWithdrawer.png
+0 −74 src/asset-manager/interfaces/IAaveWstethWithdrawer.sol
+0 −16 src/asset-manager/interfaces/IDelegateRegistry.sol
+0 −12 src/asset-manager/interfaces/ILiquidityGaugeController.sol
+0 −27 src/asset-manager/interfaces/IVeToken.sol
+0 −45 src/asset-manager/interfaces/IVlToken.sol
+0 −90 src/asset-manager/interfaces/IWardenBoost.sol
+6 −8 src/bridges/arbitrum/AaveArbEthERC20Bridge.sol
+6 −8 src/bridges/optimism/AaveOpEthERC20Bridge.sol
+6 −8 src/bridges/polygon/AavePolEthERC20Bridge.sol
+6 −8 src/bridges/polygon/AavePolEthPlasmaBridge.sol
+1 −1 src/dependencies/DefaultReserveInterestRateStrategy.sol
+23 −0 src/mocks/MockFlashLoanReceiver.sol
+1 −1 src/riskstewards/CapsPlusRiskSteward.sol
+0 −1 src/riskstewards/ICapsPlusRiskSteward.sol
+11 −11 src/swaps/AaveSwapper.sol
+2 −2 src/swaps/BaseSwapPayload.sol
+2 −2 src/swaps/DepositV2SwapPayload.sol
+2 −2 src/swaps/DepositV3SwapPayload.sol
+0 −3 src/swaps/interfaces/IAaveSwapper.sol
+1 −1 src/swaps/interfaces/IMilkman.sol
+1 −1 src/v2-config-engine/AaveV2Payload.sol
+1 −1 src/v2-config-engine/V2RateStrategyFactory.sol
+15 −0 src/v3-config-engine/AaveV3PayloadLinea.sol
+0 −17 src/v3-config-engine/AaveV3PayloadPolygonZkEvm.sol
+15 −0 src/v3-config-engine/AaveV3PayloadSonic.sol
+5 −4 tests/CollectorUtils.t.sol
+25 −8 tests/GovV3Test.t.sol
+1 −1 tests/ProtocolV2TestBase.t.sol
+2 −2 tests/ProxyHelpersTest.t.sol
+0 −287 tests/asset-manager/AaveWstethWithdrawerTest.t.sol
+0 −120 tests/asset-manager/TestLSDLiquidityGaugeManager.t.sol
+0 −125 tests/asset-manager/TestStrategicAssetsManager.t.sol
+0 −529 tests/asset-manager/TestVeTokenManager.t.sol
+0 −251 tests/asset-manager/TestVlTokenManager.t.sol
+11 −7 tests/bridges/arbitrum/AaveArbEthERC20BridgeTest.t.sol
+6 −6 tests/bridges/arbitrum/ArbSysMock.sol
+10 −5 tests/bridges/optimism/AaveOpEthERC20BridgeTest.t.sol
+13 −7 tests/bridges/polygon/AavePolEthERC20BridgeTest.t.sol
+12 −9 tests/bridges/polygon/AavePolEthPlasmaBridge.t.sol
+1 −1 tests/riskstewards/CapsPlusRiskSteward.t.sol
+20 −14 tests/swaps/AaveSwapperTest.t.sol
+1 −1 tests/swaps/DepositV2SwapPayloadTest.t.sol
+1 −1 tests/swaps/DepositV3SwapPayloadTest.t.sol
+2 −2 tests/v2-config-engine/AaveV2ConfigEngineTest.t.sol
+0 −1,041 yarn.lock
+7 −3 zksync/src/ProtocolV3TestBase.sol
+2 −2 zksync/src/SnapshotHelpersV3.sol
+22 −0 zksync/tests/ProtocolV3TestBase.t.sol
19 changes: 10 additions & 9 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ pragma solidity ^0.8.0;
import {EthereumScript} from "solidity-utils/contracts/utils/ScriptUtils.sol";
import {IPoolAddressesProvider} from "aave-v3-origin/contracts/interfaces/IPoolAddressesProvider.sol";
import {ICollector} from "aave-v3-origin/contracts/treasury/ICollector.sol";
import {
ITransparentProxyFactory,
ProxyAdmin
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {ITransparentProxyFactory} from
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {IProxyAdminOzV4} from "solidity-utils/contracts/transparent-proxy/interfaces/IProxyAdminOzV4.sol";
import {GhoDirectMinter} from "../src/GhoDirectMinter.sol";
import {IGhoToken} from "../src/interfaces/IGhoToken.sol";

Expand All @@ -19,13 +18,13 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
library DeploymentLibrary {
function _deployFacilitator(
ITransparentProxyFactory proxyFactory,
ProxyAdmin proxyAdmin,
IPoolAddressesProvider poolAddressesprovider,
address proxyAdmin,
IPoolAddressesProvider poolAddressesProvider,
address collector,
IGhoToken gho,
address council
) internal returns (address) {
address vaultImpl = address(new GhoDirectMinter(poolAddressesprovider, address(collector), address(gho)));
address vaultImpl = address(new GhoDirectMinter(poolAddressesProvider, address(collector), address(gho)));
return proxyFactory.create(
vaultImpl,
proxyAdmin,
Expand All @@ -38,8 +37,10 @@ library DeploymentLibrary {
// might make sense to have on address book
address council = 0x8513e6F37dBc52De87b166980Fa3F50639694B60;
return _deployFacilitator(
ITransparentProxyFactory(MiscEthereum.TRANSPARENT_PROXY_FACTORY),
ProxyAdmin(MiscEthereum.PROXY_ADMIN),
//ITransparentProxyFactory(MiscEthereum.TRANSPARENT_PROXY_FACTORY),
// using an old TRANSPARENT_PROXY_FACTORY, it was replaced in a new version of aave-address-book
ITransparentProxyFactory(0x9FB3B12248bf010AEA7cE08343C8499FFAB4770f),
MiscEthereum.PROXY_ADMIN,
AaveV3EthereumLido.POOL_ADDRESSES_PROVIDER,
address(AaveV3EthereumLido.COLLECTOR),
IGhoToken(AaveV3EthereumAssets.GHO_UNDERLYING),
Expand Down
7 changes: 3 additions & 4 deletions src/GhoDirectMinter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {IPoolAddressesProvider} from "aave-v3-origin/contracts/interfaces/IPoolA
import {IPoolConfigurator} from "aave-v3-origin/contracts/interfaces/IPoolConfigurator.sol";
import {ReserveConfiguration} from "aave-v3-origin/contracts/protocol/libraries/configuration/ReserveConfiguration.sol";
import {Initializable} from "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
import {SafeERC20} from "solidity-utils/contracts/oz-common/SafeERC20.sol";
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import {UpgradeableOwnableWithGuardian} from
"solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
import {IGhoToken} from "./interfaces/IGhoToken.sol";
Expand Down Expand Up @@ -46,8 +46,7 @@ contract GhoDirectMinter is Initializable, UpgradeableOwnableWithGuardian, IGhoD
}

function initialize(address owner, address council) external virtual initializer {
__Ownable_init(owner);
__Ownable_With_Guardian_init(council);
__Ownable_With_Guardian_init(owner, council);
}

// @inheritdoc IGHODirectMinter
Expand Down
10 changes: 4 additions & 6 deletions src/proposals/LidoGHOListing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
import {AaveV3PayloadEthereumLido} from "aave-helpers/src/v3-config-engine/AaveV3PayloadEthereumLido.sol";
import {EngineFlags} from "aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol";
import {IAaveV3ConfigEngine} from "aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol";
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
import {SafeERC20} from "solidity-utils/contracts/oz-common/SafeERC20.sol";
import {
ITransparentProxyFactory,
ProxyAdmin
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
import {ITransparentProxyFactory} from
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {IAccessControl} from "openzeppelin-contracts/contracts/access/IAccessControl.sol";

import {IGhoToken} from "../interfaces/IGhoToken.sol";
Expand Down
20 changes: 8 additions & 12 deletions test/Lido_GhoDirectMinter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
import {AaveV3EthereumAssets} from "aave-address-book/AaveV3Ethereum.sol";
import {AaveV3EthereumLido} from "aave-address-book/AaveV3EthereumLido.sol";
import {GovernanceV3Ethereum} from "aave-address-book/GovernanceV3Ethereum.sol";
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {ITransparentProxyFactory} from
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {
ITransparentProxyFactory,
ProxyAdmin
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
import {UpgradeableOwnableWithGuardian} from
"solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
UpgradeableOwnableWithGuardian,
IWithGuardian
} from "solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
import {GovV3Helpers} from "aave-helpers/src/GovV3Helpers.sol";
import {IPool, DataTypes} from "aave-v3-origin/contracts/interfaces/IPool.sol";
import {ReserveConfiguration} from "aave-v3-origin/contracts/protocol/libraries/configuration/ReserveConfiguration.sol";
Expand Down Expand Up @@ -68,9 +68,7 @@ contract Lido_GHODirectMinter_Test is Test {
}

function test_mintAndSupply_rando() external {
vm.expectRevert(
abi.encodeWithSelector(UpgradeableOwnableWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this))
);
vm.expectRevert(abi.encodeWithSelector(IWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this)));
minter.mintAndSupply(100);
}

Expand All @@ -83,9 +81,7 @@ contract Lido_GHODirectMinter_Test is Test {
}

function test_withdrawAndBurn_rando() external {
vm.expectRevert(
abi.encodeWithSelector(UpgradeableOwnableWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this))
);
vm.expectRevert(abi.encodeWithSelector(IWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this)));
minter.withdrawAndBurn(100);
}

Expand Down
Loading