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

Variables

minConfirmations

1
uint8 public minConfirmations;
Copied!
Minimal required confirmations

excessConfirmations

1
uint8 public excessConfirmations;
Copied!
Minimal required confirmations in case of too many confirmations

requiredOraclesCount

1
uint8 public requiredOraclesCount;
Copied!
Count of required oracles

oracleAddresses

1
address[] public oracleAddresses;
Copied!
Oracle addresses

getOracleInfo

1
mapping(address => struct IOraclesManager.OracleInfo) public getOracleInfo;
Copied!
Maps an oracle address to the oracle details

Functions

initialize

1
function initialize(
2
uint8 _minConfirmations,
3
uint8 _excessConfirmations
4
) internal
Copied!
Constructor that initializes the most important configurations.

Parameters:

Name
Type
Description
_minConfirmations
uint8
Minimal required confirmations.
_excessConfirmations
uint8
Minimal required confirmations in case of too many confirmations.

setMinConfirmations

1
function setMinConfirmations(
2
uint8 _minConfirmations
3
) external
Copied!
Sets minimal required confirmations.

Parameters:

Name
Type
Description
_minConfirmations
uint8
Minimal required confirmations.

setExcessConfirmations

1
function setExcessConfirmations(
2
uint8 _excessConfirmations
3
) external
Copied!
Sets minimal required confirmations in case of too many confirmations.

Parameters:

Name
Type
Description
_excessConfirmations
uint8
Minimal required confirmations in case of too many confirmations.

addOracles

1
function addOracles(
2
address[] _oracles,
3
bool[] _required
4
) external
Copied!
Add oracles.

Parameters:

Name
Type
Description
_oracles
address[]
Oracles' addresses.
_required
bool[]
A transfer will not be confirmed without oracles having required set to true,

updateOracle

1
function updateOracle(
2
address _oracle,
3
bool _isValid,
4
bool _required
5
) external
Copied!
Update an oracle.

Parameters:

Name
Type
Description
_oracle
address
An oracle address.
_isValid
bool
Is this oracle valid, i.e. should it be treated as an oracle.
_required
bool
If set to true a transfer will not be confirmed without this oracle.