Skip to content

Commit c374014

Browse files
committed
refactor: refactored function names
1 parent da9ab93 commit c374014

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

contracts/interfaces/IPool.sol

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,18 +602,18 @@ interface IPool {
602602
) external;
603603

604604
/**
605-
* @notice Returns the list of the initialized reserves
605+
* @notice Returns the list of the underlying assets of all the initialized reserves
606606
* @dev It does not include dropped reserves
607-
* @return The addresses of the reserves
607+
* @return The addresses of the underlying assets of the initialized reserves
608608
**/
609609
function getReservesList() external view returns (address[] memory);
610610

611611
/**
612-
* @notice Returns the address of the reserve by the reserve id as stored in the DataTypes.ReserveData struct
613-
* @dev The id of the reserve as stored in the DataTypes.ReserveData struct
612+
* @notice Returns the address of the underlying asset of a reserve by the reserve id as stored in the DataTypes.ReserveData struct
613+
* @param id The id of the reserve as stored in the DataTypes.ReserveData struct
614614
* @return The addresses of the reserve associated with id
615615
**/
616-
function getReservesList(uint16 id) external view returns (address);
616+
function getReserveAddressById(uint16 id) external view returns (address);
617617

618618
/**
619619
* @notice Returns the PoolAddressesProvider connected to this contract

contracts/protocol/pool/Pool.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ contract Pool is VersionedInitializable, PoolStorage, IPool {
554554
}
555555

556556
/// @inheritdoc IPool
557-
function getReservesList(uint16 id) external view returns (address) {
557+
function getReserveAddressById(uint16 id) external view returns (address) {
558558
return _reservesList[id];
559559
}
560560

test-suites/pool-get-reserve-address-by-id.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ makeSuite('Pool: getReservesList', (testEnv: TestEnv) => {
1818

1919
const reserveData = await pool.getReserveData(usdc.address);
2020

21-
const reserveAddress = await pool.getReservesList(reserveData.id);
21+
const reserveAddress = await pool.getReserveAddressById(reserveData.id);
2222

2323
await expect(reserveAddress).to.be.eq(usdc.address);
2424
});
@@ -28,7 +28,7 @@ makeSuite('Pool: getReservesList', (testEnv: TestEnv) => {
2828

2929
// MAX_NUMBER_RESERVES is always greater than reservesCount
3030
const maxNumberOfReserves = await pool.MAX_NUMBER_RESERVES();
31-
const reserveAddress = await pool.getReservesList(maxNumberOfReserves.add(1));
31+
const reserveAddress = await pool.getReserveAddressById(maxNumberOfReserves +1);
3232

3333
await expect(reserveAddress).to.be.eq(ZERO_ADDRESS);
3434
});

0 commit comments

Comments
 (0)