Skip to content

Commit

Permalink
🔥 remove unused comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Nov 8, 2023
1 parent 7f45aa1 commit ecdefda
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions contracts/test/helpers/MockChainlinkAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ contract MockChainlinkOracleAggregator is Ownable, IOracleAggregator {
a price of $100.50 might be represented as 100500000000 in the contract, with 9 decimal places
of precision */
uint8 decimals;
// uint8 tokenDecimals;
bool dataSigned;
address callAddress;
bytes callData;
Expand Down Expand Up @@ -96,20 +95,14 @@ contract MockChainlinkOracleAggregator is Ownable, IOracleAggregator {

// Making explicit revert or make use of stale price feed which reverts
// like done in below function and the test case
/*function _getTokenPrice(
address token
) internal view returns (uint256 tokenPriceUnadjusted) {
bool success = false;
require(success, "ChainlinkOracleAggregator:: query failed");
}*/

function _getTokenPrice(
address token
) internal view returns (uint256 tokenPriceUnadjusted) {
(bool success, bytes memory ret) = tokensInfo[token]
.callAddress
.staticcall(tokensInfo[token].callData);

require(success, "ChainlinkOracleAggregator:: query failed");
if (tokensInfo[token].dataSigned) {
tokenPriceUnadjusted = uint256(abi.decode(ret, (int256)));
Expand Down

0 comments on commit ecdefda

Please sign in to comment.