mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated addresses provider, configurator
This commit is contained in:
parent
94c9b7156c
commit
6839be6dca
|
@ -3,8 +3,8 @@ pragma solidity ^0.6.8;
|
|||
|
||||
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
|
||||
import {
|
||||
InitializableAdminUpgradeabilityProxy
|
||||
} from '../libraries/openzeppelin-upgradeability/InitializableAdminUpgradeabilityProxy.sol';
|
||||
InitializableImmutableAdminUpgradeabilityProxy
|
||||
} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';
|
||||
|
||||
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
||||
|
||||
|
@ -153,14 +153,14 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
|
|||
function _updateImpl(bytes32 id, address newAddress) internal {
|
||||
address payable proxyAddress = payable(_addresses[id]);
|
||||
|
||||
InitializableAdminUpgradeabilityProxy proxy = InitializableAdminUpgradeabilityProxy(
|
||||
InitializableImmutableAdminUpgradeabilityProxy proxy = InitializableImmutableAdminUpgradeabilityProxy(
|
||||
proxyAddress
|
||||
);
|
||||
bytes memory params = abi.encodeWithSignature('initialize(address)', address(this));
|
||||
|
||||
if (proxyAddress == address(0)) {
|
||||
proxy = new InitializableAdminUpgradeabilityProxy();
|
||||
proxy.initialize(newAddress, address(this), params);
|
||||
proxy = new InitializableImmutableAdminUpgradeabilityProxy(address(this));
|
||||
proxy.initialize(newAddress, params);
|
||||
_addresses[id] = address(proxy);
|
||||
emit ProxyCreated(id, address(proxy));
|
||||
} else {
|
||||
|
|
|
@ -7,8 +7,8 @@ import {
|
|||
VersionedInitializable
|
||||
} from '../libraries/openzeppelin-upgradeability/VersionedInitializable.sol';
|
||||
import {
|
||||
InitializableAdminUpgradeabilityProxy
|
||||
} from '../libraries/openzeppelin-upgradeability/InitializableAdminUpgradeabilityProxy.sol';
|
||||
InitializableImmutableAdminUpgradeabilityProxy
|
||||
} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';
|
||||
import {ReserveConfiguration} from '../libraries/configuration/ReserveConfiguration.sol';
|
||||
import {ILendingPoolAddressesProvider} from '../interfaces/ILendingPoolAddressesProvider.sol';
|
||||
import {ILendingPool} from '../interfaces/ILendingPool.sol';
|
||||
|
@ -559,7 +559,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
* @param decimals the decimals of the token
|
||||
**/
|
||||
function _initTokenWithProxy(address implementation, uint8 decimals) internal returns (address) {
|
||||
InitializableAdminUpgradeabilityProxy proxy = new InitializableAdminUpgradeabilityProxy();
|
||||
InitializableImmutableAdminUpgradeabilityProxy proxy = new InitializableImmutableAdminUpgradeabilityProxy(address(this));
|
||||
|
||||
bytes memory params = abi.encodeWithSignature(
|
||||
'initialize(uint8,string,string)',
|
||||
|
@ -568,7 +568,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
IERC20Detailed(implementation).symbol()
|
||||
);
|
||||
|
||||
proxy.initialize(implementation, address(this), params);
|
||||
proxy.initialize(implementation, params);
|
||||
|
||||
return address(proxy);
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ contract LendingPoolConfigurator is VersionedInitializable {
|
|||
address proxyAddress,
|
||||
address implementation
|
||||
) internal {
|
||||
InitializableAdminUpgradeabilityProxy proxy = InitializableAdminUpgradeabilityProxy(
|
||||
InitializableImmutableAdminUpgradeabilityProxy proxy = InitializableImmutableAdminUpgradeabilityProxy(
|
||||
payable(proxyAddress)
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user