Skip to content

Commit e9aefb2

Browse files
authored
Updated submodules (#5)
1 parent 80a7f66 commit e9aefb2

File tree

6 files changed

+27
-33
lines changed

6 files changed

+27
-33
lines changed

lib/aave-helpers

Submodule aave-helpers updated 83 files

script/Deploy.s.sol

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ pragma solidity ^0.8.0;
44
import {EthereumScript} from "solidity-utils/contracts/utils/ScriptUtils.sol";
55
import {IPoolAddressesProvider} from "aave-v3-origin/contracts/interfaces/IPoolAddressesProvider.sol";
66
import {ICollector} from "aave-v3-origin/contracts/treasury/ICollector.sol";
7-
import {
8-
ITransparentProxyFactory,
9-
ProxyAdmin
10-
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
7+
import {ITransparentProxyFactory} from
8+
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
9+
import {IProxyAdminOzV4} from "solidity-utils/contracts/transparent-proxy/interfaces/IProxyAdminOzV4.sol";
1110
import {GhoDirectMinter} from "../src/GhoDirectMinter.sol";
1211
import {IGhoToken} from "../src/interfaces/IGhoToken.sol";
1312

@@ -19,13 +18,13 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
1918
library DeploymentLibrary {
2019
function _deployFacilitator(
2120
ITransparentProxyFactory proxyFactory,
22-
ProxyAdmin proxyAdmin,
23-
IPoolAddressesProvider poolAddressesprovider,
21+
address proxyAdmin,
22+
IPoolAddressesProvider poolAddressesProvider,
2423
address collector,
2524
IGhoToken gho,
2625
address council
2726
) internal returns (address) {
28-
address vaultImpl = address(new GhoDirectMinter(poolAddressesprovider, address(collector), address(gho)));
27+
address vaultImpl = address(new GhoDirectMinter(poolAddressesProvider, address(collector), address(gho)));
2928
return proxyFactory.create(
3029
vaultImpl,
3130
proxyAdmin,
@@ -38,8 +37,10 @@ library DeploymentLibrary {
3837
// might make sense to have on address book
3938
address council = 0x8513e6F37dBc52De87b166980Fa3F50639694B60;
4039
return _deployFacilitator(
41-
ITransparentProxyFactory(MiscEthereum.TRANSPARENT_PROXY_FACTORY),
42-
ProxyAdmin(MiscEthereum.PROXY_ADMIN),
40+
//ITransparentProxyFactory(MiscEthereum.TRANSPARENT_PROXY_FACTORY),
41+
// using an old TRANSPARENT_PROXY_FACTORY, it was replaced in a new version of aave-address-book
42+
ITransparentProxyFactory(0x9FB3B12248bf010AEA7cE08343C8499FFAB4770f),
43+
MiscEthereum.PROXY_ADMIN,
4344
AaveV3EthereumLido.POOL_ADDRESSES_PROVIDER,
4445
address(AaveV3EthereumLido.COLLECTOR),
4546
IGhoToken(AaveV3EthereumAssets.GHO_UNDERLYING),

src/GhoDirectMinter.sol

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {IPoolAddressesProvider} from "aave-v3-origin/contracts/interfaces/IPoolA
66
import {IPoolConfigurator} from "aave-v3-origin/contracts/interfaces/IPoolConfigurator.sol";
77
import {ReserveConfiguration} from "aave-v3-origin/contracts/protocol/libraries/configuration/ReserveConfiguration.sol";
88
import {Initializable} from "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol";
9-
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
10-
import {SafeERC20} from "solidity-utils/contracts/oz-common/SafeERC20.sol";
9+
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
10+
import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
1111
import {UpgradeableOwnableWithGuardian} from
1212
"solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
1313
import {IGhoToken} from "./interfaces/IGhoToken.sol";
@@ -46,8 +46,7 @@ contract GhoDirectMinter is Initializable, UpgradeableOwnableWithGuardian, IGhoD
4646
}
4747

4848
function initialize(address owner, address council) external virtual initializer {
49-
__Ownable_init(owner);
50-
__Ownable_With_Guardian_init(council);
49+
__Ownable_With_Guardian_init(owner, council);
5150
}
5251

5352
// @inheritdoc IGHODirectMinter

src/proposals/LidoGHOListing.sol

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
77
import {AaveV3PayloadEthereumLido} from "aave-helpers/src/v3-config-engine/AaveV3PayloadEthereumLido.sol";
88
import {EngineFlags} from "aave-v3-origin/contracts/extensions/v3-config-engine/EngineFlags.sol";
99
import {IAaveV3ConfigEngine} from "aave-v3-origin/contracts/extensions/v3-config-engine/IAaveV3ConfigEngine.sol";
10-
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
11-
import {SafeERC20} from "solidity-utils/contracts/oz-common/SafeERC20.sol";
12-
import {
13-
ITransparentProxyFactory,
14-
ProxyAdmin
15-
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
10+
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
11+
import {SafeERC20} from "openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";
12+
import {ITransparentProxyFactory} from
13+
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
1614
import {IAccessControl} from "openzeppelin-contracts/contracts/access/IAccessControl.sol";
1715

1816
import {IGhoToken} from "../interfaces/IGhoToken.sol";

test/Lido_GhoDirectMinter.t.sol

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import {MiscEthereum} from "aave-address-book/MiscEthereum.sol";
66
import {AaveV3EthereumAssets} from "aave-address-book/AaveV3Ethereum.sol";
77
import {AaveV3EthereumLido} from "aave-address-book/AaveV3EthereumLido.sol";
88
import {GovernanceV3Ethereum} from "aave-address-book/GovernanceV3Ethereum.sol";
9-
import {IERC20} from "solidity-utils/contracts/oz-common/interfaces/IERC20.sol";
9+
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
10+
import {ITransparentProxyFactory} from
11+
"solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
1012
import {
11-
ITransparentProxyFactory,
12-
ProxyAdmin
13-
} from "solidity-utils/contracts/transparent-proxy/interfaces/ITransparentProxyFactory.sol";
14-
import {UpgradeableOwnableWithGuardian} from
15-
"solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
13+
UpgradeableOwnableWithGuardian,
14+
IWithGuardian
15+
} from "solidity-utils/contracts/access-control/UpgradeableOwnableWithGuardian.sol";
1616
import {GovV3Helpers} from "aave-helpers/src/GovV3Helpers.sol";
1717
import {IPool, DataTypes} from "aave-v3-origin/contracts/interfaces/IPool.sol";
1818
import {ReserveConfiguration} from "aave-v3-origin/contracts/protocol/libraries/configuration/ReserveConfiguration.sol";
@@ -68,9 +68,7 @@ contract Lido_GHODirectMinter_Test is Test {
6868
}
6969

7070
function test_mintAndSupply_rando() external {
71-
vm.expectRevert(
72-
abi.encodeWithSelector(UpgradeableOwnableWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this))
73-
);
71+
vm.expectRevert(abi.encodeWithSelector(IWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this)));
7472
minter.mintAndSupply(100);
7573
}
7674

@@ -83,9 +81,7 @@ contract Lido_GHODirectMinter_Test is Test {
8381
}
8482

8583
function test_withdrawAndBurn_rando() external {
86-
vm.expectRevert(
87-
abi.encodeWithSelector(UpgradeableOwnableWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this))
88-
);
84+
vm.expectRevert(abi.encodeWithSelector(IWithGuardian.OnlyGuardianOrOwnerInvalidCaller.selector, address(this)));
8985
minter.withdrawAndBurn(100);
9086
}
9187

0 commit comments

Comments
 (0)