Skip to content

Commit

Permalink
fix: Fix docs typos of protocol/configuration package
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf committed Sep 8, 2021
1 parent 9622097 commit d679c22
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
10 changes: 4 additions & 6 deletions contracts/interfaces/IPoolAddressesProvider.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.8.6;

/**
* @title PoolAddressesProvider contract
/**
* @title IPoolAddressesProvider
* @author Aave
* @notice Main registry of addresses part of or connected to the protocol, including permissioned roles
* @dev Acting also as factory of proxies and admin of those, so with right to change its implementations
* Owned by the Aave Governance
* @notice Defines the basic interface for a Pool Addresses Provider.
**/
interface IPoolAddressesProvider {
event MarketIdSet(string newMarketId);
Expand All @@ -20,7 +18,7 @@ interface IPoolAddressesProvider {
event AddressSet(bytes32 id, address indexed newAddress, bool hasProxy);

/**
* @notice Returns the id of the Aave market to which this contracts points to
* @notice Returns the id of the Aave market to which this contract points to
* @return The market id
**/
function getMarketId() external view returns (string memory);
Expand Down
12 changes: 5 additions & 7 deletions contracts/interfaces/IPoolAddressesProviderRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@
pragma solidity 0.8.6;

/**
* @title PoolAddressesProviderRegistry contract
* @title IPoolAddressesProviderRegistry
* @author Aave
* @notice Main registry of PoolAddressesProvider of multiple Aave protocol's markets
* - Used for indexing purposes of Aave protocol's markets
* - The id assigned to a PoolAddressesProvider refers to the market it is connected with,
* for example with `0` for the Aave main market and `1` for the next created
* @notice Defines the basic interface for an Aave Pool Addresses Provider Registry.
**/
interface IPoolAddressesProviderRegistry {
event AddressesProviderRegistered(address indexed newAddress);
Expand All @@ -21,7 +18,8 @@ interface IPoolAddressesProviderRegistry {

/**
* @notice Returns the id on a registered PoolAddressesProvider
* @return The id or 0 if the PoolAddressesProvider is not registered
* @param addressesProvider the address of the PoolAddressesProvider
* @return The id of the PoolAddressesProvider or 0 if is not registered
*/
function getAddressesProviderIdByAddress(address addressesProvider)
external
Expand All @@ -36,7 +34,7 @@ interface IPoolAddressesProviderRegistry {
function registerAddressesProvider(address provider, uint256 id) external;

/**
* @notice Removes a PoolAddressesProvider from the list of registered addresses provider
* @notice Removes a PoolAddressesProvider from the list of registered addresses providers
* @param provider The PoolAddressesProvider address
**/
function unregisterAddressesProvider(address provider) external;
Expand Down
9 changes: 3 additions & 6 deletions contracts/protocol/configuration/PoolAddressesProvider.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
pragma solidity 0.8.6;

import {Ownable} from '../../dependencies/openzeppelin/contracts/Ownable.sol';

// Prettier ignore to prevent hardhat flatter bug
// prettier-ignore
import {InitializableImmutableAdminUpgradeabilityProxy} from '../libraries/aave-upgradeability/InitializableImmutableAdminUpgradeabilityProxy.sol';

import {IPoolAddressesProvider} from '../../interfaces/IPoolAddressesProvider.sol';

/**
* @title PoolAddressesProvider contract
* @author Aave
* @notice Main registry of addresses part of or connected to the protocol, including permissioned roles
* - Acting also as factory of proxies and admin of those, so with right to change its implementations
* @dev Acts as factory of proxies and admin of those, so with right to change its implementations
* - Owned by the Aave Governance
**/
contract PoolAddressesProvider is Ownable, IPoolAddressesProvider {
Expand Down Expand Up @@ -123,7 +119,7 @@ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider {

/**
* @notice Internal function to update the implementation of a specific proxied component of the protocol
* @dev - If there is no proxy registered in the given `id`, it creates the proxy setting `newAdress`
* @dev If there is no proxy registered in the given `id`, it creates the proxy setting `newAdress`
* as implementation and calls the initialize() function on the proxy
* - If there is already a proxy registered, it just updates the implementation to `newAddress` and
* calls the initialize() function via upgradeToAndCall() in the proxy
Expand All @@ -148,6 +144,7 @@ contract PoolAddressesProvider is Ownable, IPoolAddressesProvider {
}
}

///@inheritdoc IPoolAddressesProvider
function _setMarketId(string memory marketId) internal {
_marketId = marketId;
emit MarketIdSet(marketId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import {Errors} from '../libraries/helpers/Errors.sol';
* @title PoolAddressesProviderRegistry contract
* @author Aave
* @notice Main registry of PoolAddressesProvider of multiple Aave protocol's markets
* - Used for indexing purposes of Aave protocol's markets
* - The id assigned to a PoolAddressesProvider refers to the market it is connected with,
* for example with `0` for the Aave main market and `1` for the next created
* @dev Used for indexing purposes of Aave protocol's markets. The id assigned
* to a PoolAddressesProvider refers to the market it is connected with, for
* example with `0` for the Aave main market and `1` for the next created.
**/
contract PoolAddressesProviderRegistry is Ownable, IPoolAddressesProviderRegistry {
mapping(address => uint256) private _addressesProviders;
Expand Down

0 comments on commit d679c22

Please sign in to comment.