DenominatedOracleFactory

Git Source

Inherits: Authorizable, IDenominatedOracleFactory

This contract is used to deploy DenominatedOracle contracts

The deployed contracts are DenominatedOracleChild instances

State Variables

_denominatedOracles

The enumerable set of deployed DenominatedOracle contracts

EnumerableSet.AddressSet internal _denominatedOracles;

Functions

constructor

constructor() Authorizable(msg.sender);

deployDenominatedOracle

Deploys a new DenominatedOracle contract

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

function deployDenominatedOracle(
  IBaseOracle _priceSource,
  IBaseOracle _denominationPriceSource,
  bool _inverted
) external isAuthorized 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