Skip to content

Commit

Permalink
make functions external instead of public where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverNChalk committed Jul 8, 2024
1 parent a605766 commit 391a906
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ReservoirPriceOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ contract ReservoirPriceOracle is IPriceOracle, IReservoirPriceOracle, Owned(msg.
/// @param aTokenA Address of one of the tokens for the price update. Does not have to be less than address of aTokenB
/// @param aTokenB Address of one of the tokens for the price update. Does not have to be greater than address of aTokenA
/// @param aRewardRecipient The beneficiary of the reward. Must be able to receive ether. Set to address(0) if not seeking a reward
function updatePrice(address aTokenA, address aTokenB, address aRewardRecipient) public nonReentrant {
function updatePrice(address aTokenA, address aTokenB, address aRewardRecipient) external nonReentrant {
(address lToken0, address lToken1) = Utils.sortTokens(aTokenA, aTokenB);

(address[] memory lRoute,, uint256 lPrevPrice) = _getRouteDecimalDifferencePrice(lToken0, lToken1);
Expand Down Expand Up @@ -166,9 +166,10 @@ contract ReservoirPriceOracle is IPriceOracle, IReservoirPriceOracle, Owned(msg.

// IReservoirPriceOracle

// REVIEW: This let's anyone read the Reservoir oracle without paying right?
/// @inheritdoc IReservoirPriceOracle
function getTimeWeightedAverage(OracleAverageQuery[] memory aQueries)
public
external
view
returns (uint256[] memory rResults)
{
Expand All @@ -178,6 +179,7 @@ contract ReservoirPriceOracle is IPriceOracle, IReservoirPriceOracle, Owned(msg.
}
}

// REVIEW: What value is there in this?
/// @inheritdoc IReservoirPriceOracle
function getLatest(OracleLatestQuery calldata aQuery) external view returns (uint256) {
ReservoirPair lPair = pairs[aQuery.base][aQuery.quote];
Expand Down

0 comments on commit 391a906

Please sign in to comment.