Skip to content

Commit

Permalink
fix linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmckelvy1 committed Oct 28, 2024
1 parent d7e68b0 commit 7713c03
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contracts/facade/factories/ExchangeRateOracleFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface IMinimalRToken {

contract ExchangeRateOracle {
error MissingRToken();

address public immutable rToken;

constructor(address _rToken) {
Expand All @@ -23,7 +23,7 @@ contract ExchangeRateOracle {
function exchangeRate() public view returns (uint256) {
address _rToken = rToken;
if (_rToken == address(0)) revert MissingRToken();

uint256 supply = IMinimalRToken(_rToken).totalSupply();
if (supply == 0) return FIX_ONE;

Expand All @@ -50,7 +50,6 @@ contract ExchangeRateOracle {
}
}


/**
* @title ExchangeRateOracleFactory
* @notice An immutable factory for Exchange Rate Oracles
Expand All @@ -60,13 +59,14 @@ contract ExchangeRateOracleFactory {

event OracleDeployed(address indexed rToken, address indexed oracle);

mapping(address rToken => ExchangeRateOracle oracle) public oracles;
// {rtoken} => {oracle}
mapping(address => ExchangeRateOracle) public oracles;

function deployOracle(address rToken) external returns (address) {
if (address(oracles[rToken]) != address(0)) revert OracleAlreadyDeployed();
ExchangeRateOracle oracle = new ExchangeRateOracle(rToken);

if (rToken != address(0)){
if (rToken != address(0)) {
oracle.exchangeRate();
oracle.latestRoundData();
oracle.decimals();
Expand Down

0 comments on commit 7713c03

Please sign in to comment.