OraclesManager

The base contract for oracles management. Allows adding/removing oracles, managing the minimal required amount of confirmations.

Variables

minConfirmations

  uint8 public minConfirmations;

Minimal required confirmations

excessConfirmations

  uint8 public excessConfirmations;

Minimal required confirmations in case of too many confirmations

requiredOraclesCount

  uint8 public requiredOraclesCount;

Count of required oracles

oracleAddresses

  address[] public oracleAddresses;

Oracle addresses

getOracleInfo

  mapping(address => struct IOraclesManager.OracleInfo) public getOracleInfo;

Maps an oracle address to the oracle details

Functions

initialize

  function initialize(
            uint8 _minConfirmations,
            uint8 _excessConfirmations
  ) internal

Constructor that initializes the most important configurations.

Parameters:

setMinConfirmations

  function setMinConfirmations(
            uint8 _minConfirmations
  ) external

Sets minimal required confirmations.

Parameters:

setExcessConfirmations

  function setExcessConfirmations(
            uint8 _excessConfirmations
  ) external

Sets minimal required confirmations in case of too many confirmations.

Parameters:

addOracles

  function addOracles(
            address[] _oracles,
            bool[] _required
  ) external

Add oracles.

Parameters:

updateOracle

  function updateOracle(
            address _oracle,
            bool _isValid,
            bool _required
  ) external

Update an oracle.

Parameters:

Last updated