IDenominatedOracleFactory

Git Source

Inherits: IAuthorizable

Functions

deployDenominatedOracle

Deploys a new DenominatedOracle contract

The denomination quote should follow the format: (A / B) * (B / C) = A / C

If the quote is inverted, the format should be read as: (B / A)^-1 * (B / C) = A / C

function deployDenominatedOracle(
  IBaseOracle _priceSource,
  IBaseOracle _denominationPriceSource,
  bool _inverted
) external returns (IBaseOracle _denominatedOracle);

Parameters

NameTypeDescription
_priceSourceIBaseOracleAddress of the price source for the DenominatedOracle contract
_denominationPriceSourceIBaseOracleAddress of the denomination price source for the DenominatedOracle contract
_invertedboolBoolean indicating if the denomination calculation quote should be inverted

Returns

NameTypeDescription
_denominatedOracleIBaseOracleAddress of the deployed DenominatedOracle contract

denominatedOraclesList

Getter for the list of DenominatedOracle contracts

function denominatedOraclesList() external view returns (address[] memory _denominatedOraclesList);

Returns

NameTypeDescription
_denominatedOraclesListaddress[]List of DenominatedOracle contracts

Events

NewDenominatedOracle

Emitted when a new DenominatedOracle contract is deployed

event NewDenominatedOracle(
  address indexed _denominatedOracle, address _priceSource, address _denominationPriceSource, bool _inverted
);

Parameters

NameTypeDescription
_denominatedOracleaddressAddress of the deployed DenominatedOracle contract
_priceSourceaddressAddress of the price source for the DenominatedOracle contract
_denominationPriceSourceaddressAddress of the denomination price source for the DenominatedOracle contract
_invertedboolBoolean indicating if the denomination calculation quote should be inverted