February 13, 2023
The smart contracts in Aave Protocol are upgradeable through governance. The protocol keeps a global register of the latest addresses deployed on a particular network (i.e. Mainnet, Kovan, Ropsten).
/// Retrieve LendingPool address
LendingPoolAddressesProvider provider = LendingPoolAddressesProvider(address(0x24a42fD28C976A61Df5D00D0599C34c4f90748c8)); // mainnet address, for other addresses: <https://docs.aave.com/developers/deployed-contracts/deployed-contract-instances>
LendingPool lendingPool = LendingPool(provider.getLendingPool());