Branch data Line data Source code
1 : : // SPDX-License-Identifier: MIT
2 : : pragma solidity ^0.8.0;
3 : :
4 : : import {Pool} from '../protocol/pool/Pool.sol';
5 : : import {IPoolAddressesProvider} from '../interfaces/IPoolAddressesProvider.sol';
6 : : import {Errors} from '../protocol/libraries/helpers/Errors.sol';
7 : :
8 : : contract PoolInstance is Pool {
9 : : uint256 public constant POOL_REVISION = 5;
10 : :
11 : : constructor(IPoolAddressesProvider provider) Pool(provider) {}
12 : :
13 : : /**
14 : : * @notice Initializes the Pool.
15 : : * @dev Function is invoked by the proxy contract when the Pool contract is added to the
16 : : * PoolAddressesProvider of the market.
17 : : * @dev Caching the address of the PoolAddressesProvider in order to reduce gas consumption on subsequent operations
18 : : * @param provider The address of the PoolAddressesProvider
19 : : */
20 : : function initialize(IPoolAddressesProvider provider) external virtual override initializer {
21 : 1395 : require(provider == ADDRESSES_PROVIDER, Errors.INVALID_ADDRESSES_PROVIDER);
22 : : }
23 : :
24 : : function getRevision() internal pure virtual override returns (uint256) {
25 : 1395 : return POOL_REVISION;
26 : : }
27 : : }
|