mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
remove FeeProvider setters and getters
This commit is contained in:
parent
2579bbcfec
commit
1a2bfcbf45
|
@ -24,7 +24,6 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
|
|||
event EthereumAddressUpdated(address indexed newAddress);
|
||||
event PriceOracleUpdated(address indexed newAddress);
|
||||
event LendingRateOracleUpdated(address indexed newAddress);
|
||||
event FeeProviderUpdated(address indexed newAddress);
|
||||
|
||||
event ProxyCreated(bytes32 id, address indexed newAddress);
|
||||
|
||||
|
@ -38,7 +37,6 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
|
|||
bytes32 private constant ETHEREUM_ADDRESS = 'ETHEREUM_ADDRESS';
|
||||
bytes32 private constant PRICE_ORACLE = 'PRICE_ORACLE';
|
||||
bytes32 private constant LENDING_RATE_ORACLE = 'LENDING_RATE_ORACLE';
|
||||
bytes32 private constant FEE_PROVIDER = 'FEE_PROVIDER';
|
||||
bytes32 private constant WALLET_BALANCE_PROVIDER = 'WALLET_BALANCE_PROVIDER';
|
||||
|
||||
/**
|
||||
|
@ -75,23 +73,6 @@ contract LendingPoolAddressesProvider is Ownable, ILendingPoolAddressesProvider
|
|||
emit LendingPoolConfiguratorUpdated(configurator);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the address of the FeeProvider proxy
|
||||
* @return the address of the Fee provider proxy
|
||||
**/
|
||||
function getFeeProvider() external override view returns (address) {
|
||||
return _addresses[FEE_PROVIDER];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev updates the implementation of the FeeProvider proxy
|
||||
* @param feeProvider the new lending pool fee provider implementation
|
||||
**/
|
||||
function setFeeProviderImpl(address feeProvider) external override onlyOwner {
|
||||
updateImplInternal(FEE_PROVIDER, feeProvider);
|
||||
emit FeeProviderUpdated(feeProvider);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the address of the LendingPoolLiquidationManager. Since the manager is used
|
||||
* through delegateCall within the LendingPool contract, the proxy contract pattern does not work properly hence
|
||||
|
|
|
@ -15,10 +15,6 @@ interface ILendingPoolAddressesProvider {
|
|||
|
||||
function setLendingPoolConfiguratorImpl(address configurator) external;
|
||||
|
||||
function getFeeProvider() external view returns (address);
|
||||
|
||||
function setFeeProviderImpl(address feeProvider) external;
|
||||
|
||||
function getLendingPoolLiquidationManager() external view returns (address);
|
||||
|
||||
function setLendingPoolLiquidationManager(address manager) external;
|
||||
|
|
|
@ -31,7 +31,8 @@
|
|||
},
|
||||
"FeeProvider": {
|
||||
"buidlerevm": {
|
||||
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
|
||||
"address": "0xFAe0fd738dAbc8a0426F47437322b6d026A9FD95",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
|
||||
|
@ -49,7 +50,7 @@
|
|||
},
|
||||
"LendingPoolConfigurator": {
|
||||
"buidlerevm": {
|
||||
"address": "0x9EC0480CF106d6dc1c7849BA141a56F874170F97"
|
||||
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
|
||||
},
|
||||
"localhost": {
|
||||
"address": "0x9EC0480CF106d6dc1c7849BA141a56F874170F97"
|
||||
|
@ -62,7 +63,7 @@
|
|||
},
|
||||
"LendingPool": {
|
||||
"buidlerevm": {
|
||||
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
|
||||
"address": "0xD9273d497eDBC967F39d419461CfcF382a0A822e"
|
||||
},
|
||||
"localhost": {
|
||||
"address": "0x6642B57e4265BAD868C17Fc1d1F4F88DBBA04Aa8"
|
||||
|
@ -70,7 +71,7 @@
|
|||
},
|
||||
"PriceOracle": {
|
||||
"buidlerevm": {
|
||||
"address": "0x099d9fF8F818290C8b5B7Db5bFca84CEebd2714c",
|
||||
"address": "0x1750499D05Ed1674d822430FB960d5F6731fDf64",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -80,7 +81,7 @@
|
|||
},
|
||||
"MockAggregator": {
|
||||
"buidlerevm": {
|
||||
"address": "0xAF6BA11790D1942625C0c2dA07da19AB63845cfF",
|
||||
"address": "0xEC1C93A9f6a9e18E97784c76aC52053587FcDB89",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -90,7 +91,7 @@
|
|||
},
|
||||
"ChainlinkProxyPriceProvider": {
|
||||
"buidlerevm": {
|
||||
"address": "0xD83D2773a7873ae2b5f8Fb92097e20a8C64F691E",
|
||||
"address": "0x7B6C3e5486D9e6959441ab554A889099eed76290",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -100,7 +101,7 @@
|
|||
},
|
||||
"LendingRateOracle": {
|
||||
"buidlerevm": {
|
||||
"address": "0xf91aC1098F3b154671Ce83290114aaE45ac0225f",
|
||||
"address": "0xD83D2773a7873ae2b5f8Fb92097e20a8C64F691E",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -110,7 +111,7 @@
|
|||
},
|
||||
"DefaultReserveInterestRateStrategy": {
|
||||
"buidlerevm": {
|
||||
"address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d",
|
||||
"address": "0x626FdE749F9d499d3777320CAf29484B624ab84a",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -165,7 +166,7 @@
|
|||
},
|
||||
"MockFlashLoanReceiver": {
|
||||
"buidlerevm": {
|
||||
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10"
|
||||
"address": "0x2B681757d757fbB80cc51c6094cEF5eE75bF55aA"
|
||||
},
|
||||
"localhost": {
|
||||
"address": "0x3bDA11B584dDff7F66E0cFe1da1562c92B45db60"
|
||||
|
@ -173,7 +174,7 @@
|
|||
},
|
||||
"WalletBalanceProvider": {
|
||||
"buidlerevm": {
|
||||
"address": "0x2cfcA5785261fbC88EFFDd46fCFc04c22525F9e4",
|
||||
"address": "0xBEF0d4b9c089a5883741fC14cbA352055f35DDA2",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -413,7 +414,7 @@
|
|||
},
|
||||
"AaveProtocolTestHelpers": {
|
||||
"buidlerevm": {
|
||||
"address": "0xC6bA6049F86d528698B5924B8fC2FE7289D38578"
|
||||
"address": "0xDf73fC454FA018051D4a1509e63D11530A59DE10"
|
||||
},
|
||||
"localhost": {
|
||||
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460"
|
||||
|
@ -421,7 +422,7 @@
|
|||
},
|
||||
"StableDebtToken": {
|
||||
"buidlerevm": {
|
||||
"address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E",
|
||||
"address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -431,7 +432,7 @@
|
|||
},
|
||||
"VariableDebtToken": {
|
||||
"buidlerevm": {
|
||||
"address": "0x5f7134cd38C826a7649f9Cc47dda24d834DD2967",
|
||||
"address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -445,13 +446,13 @@
|
|||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"buidlerevm": {
|
||||
"address": "0xE91bBe8ee03560E3dda2786f95335F5399813Ca0",
|
||||
"address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
}
|
||||
},
|
||||
"MockAToken": {
|
||||
"buidlerevm": {
|
||||
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460",
|
||||
"address": "0x3bDA11B584dDff7F66E0cFe1da1562c92B45db60",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -471,7 +472,7 @@
|
|||
},
|
||||
"MockStableDebtToken": {
|
||||
"buidlerevm": {
|
||||
"address": "0xEBAB67ee3ef604D5c250A53b4b8fcbBC6ec3007C",
|
||||
"address": "0x392E5355a0e88Bd394F717227c752670fb3a8020",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
@ -481,7 +482,7 @@
|
|||
},
|
||||
"MockVariableDebtToken": {
|
||||
"buidlerevm": {
|
||||
"address": "0xBE36BE5680244Ae1A6F983E4A6f6E1c142cdAbe3",
|
||||
"address": "0x3b050AFb4ac4ACE646b31fF3639C1CD43aC31460",
|
||||
"deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6"
|
||||
},
|
||||
"localhost": {
|
||||
|
|
|
@ -13,7 +13,6 @@ import {
|
|||
import {LendingPoolAddressesProvider} from '../types/LendingPoolAddressesProvider';
|
||||
import {MintableErc20} from '../types/MintableErc20';
|
||||
import {LendingPoolAddressesProviderRegistry} from '../types/LendingPoolAddressesProviderRegistry';
|
||||
import {FeeProvider} from '../types/FeeProvider';
|
||||
import {LendingPoolConfigurator} from '../types/LendingPoolConfigurator';
|
||||
import {readArtifact} from '@nomiclabs/buidler/plugins';
|
||||
import {Artifact} from '@nomiclabs/buidler/types';
|
||||
|
@ -101,9 +100,6 @@ export const deployLendingPoolAddressesProviderRegistry = async () =>
|
|||
[]
|
||||
);
|
||||
|
||||
export const deployFeeProvider = async () =>
|
||||
await deployContract<FeeProvider>(eContractid.FeeProvider, []);
|
||||
|
||||
export const deployLendingPoolConfigurator = async () =>
|
||||
await deployContract<LendingPoolConfigurator>(eContractid.LendingPoolConfigurator, []);
|
||||
|
||||
|
@ -331,13 +327,6 @@ export const getLendingPool = async (address?: tEthereumAddress) => {
|
|||
);
|
||||
};
|
||||
|
||||
export const getFeeProvider = async (address?: tEthereumAddress) => {
|
||||
return await getContract<FeeProvider>(
|
||||
eContractid.FeeProvider,
|
||||
address || (await getDb().get(`${eContractid.FeeProvider}.${BRE.network.name}`).value()).address
|
||||
);
|
||||
};
|
||||
|
||||
export const getPriceOracle = async (address?: tEthereumAddress) => {
|
||||
return await getContract<PriceOracle>(
|
||||
eContractid.PriceOracle,
|
||||
|
|
|
@ -17,12 +17,10 @@ export enum eContractid {
|
|||
LendingPoolAddressesProvider = 'LendingPoolAddressesProvider',
|
||||
MintableERC20 = 'MintableERC20',
|
||||
LendingPoolAddressesProviderRegistry = 'LendingPoolAddressesProviderRegistry',
|
||||
FeeProvider = 'FeeProvider',
|
||||
LendingPoolParametersProvider = 'LendingPoolParametersProvider',
|
||||
LendingPoolConfigurator = 'LendingPoolConfigurator',
|
||||
ValidationLogic = 'ValidationLogic',
|
||||
ReserveLogic = 'ReserveLogic',
|
||||
UserLogic = 'UserLogic',
|
||||
GenericLogic = 'GenericLogic',
|
||||
LendingPool = 'LendingPool',
|
||||
PriceOracle = 'PriceOracle',
|
||||
|
@ -32,7 +30,6 @@ export enum eContractid {
|
|||
ChainlinkProxyPriceProvider = 'ChainlinkProxyPriceProvider',
|
||||
DefaultReserveInterestRateStrategy = 'DefaultReserveInterestRateStrategy',
|
||||
LendingPoolLiquidationManager = 'LendingPoolLiquidationManager',
|
||||
TokenDistributor = 'TokenDistributor',
|
||||
InitializableAdminUpgradeabilityProxy = 'InitializableAdminUpgradeabilityProxy',
|
||||
MockFlashLoanReceiver = 'MockFlashLoanReceiver',
|
||||
WalletBalanceProvider = 'WalletBalanceProvider',
|
||||
|
|
|
@ -4,7 +4,6 @@ import {
|
|||
deployLendingPoolAddressesProvider,
|
||||
deployMintableErc20,
|
||||
deployLendingPoolAddressesProviderRegistry,
|
||||
deployFeeProvider,
|
||||
deployLendingPoolConfigurator,
|
||||
deployLendingPool,
|
||||
deployPriceOracle,
|
||||
|
@ -16,7 +15,6 @@ import {
|
|||
deployLendingPoolLiquidationManager,
|
||||
deployMockFlashLoanReceiver,
|
||||
deployWalletBalancerProvider,
|
||||
getFeeProvider,
|
||||
getLendingPool,
|
||||
insertContractAddressInDb,
|
||||
deployAaveProtocolTestHelpers,
|
||||
|
@ -362,11 +360,6 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
await addressesProviderRegistry.registerAddressesProvider(addressesProvider.address, 0)
|
||||
);
|
||||
|
||||
const feeProviderImpl = await deployFeeProvider();
|
||||
await waitForTx(await addressesProvider.setFeeProviderImpl(feeProviderImpl.address));
|
||||
const feeProviderProxy = await getFeeProvider(await addressesProvider.getFeeProvider());
|
||||
await insertContractAddressInDb(eContractid.FeeProvider, feeProviderProxy.address);
|
||||
|
||||
const lendingPoolImpl = await deployLendingPool();
|
||||
|
||||
console.log('Deployed lending pool, address:', lendingPoolImpl.address);
|
||||
|
|
|
@ -12,7 +12,6 @@ makeSuite('LendingPoolAddressesProvider', (testEnv: TestEnv) => {
|
|||
await addressesProvider.transferOwnership(users[1].address);
|
||||
|
||||
for (const contractFunction of [
|
||||
addressesProvider.setFeeProviderImpl,
|
||||
addressesProvider.setLendingPoolImpl,
|
||||
addressesProvider.setLendingPoolConfiguratorImpl,
|
||||
addressesProvider.setLendingPoolLiquidationManager,
|
||||
|
|
Loading…
Reference in New Issue
Block a user