> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OraclesManager

> OraclesManager contract details - fields and functions.

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

***

## Variables

### minConfirmations

```solidity theme={null}
uint8 public minConfirmations;
```

Minimal required confirmations

### excessConfirmations

```solidity theme={null}
uint8 public excessConfirmations;
```

Minimal required confirmations in case of too many confirmations

### requiredOraclesCount

```solidity theme={null}
uint8 public requiredOraclesCount;
```

Count of required oracles

### oracleAddresses

```solidity theme={null}
address[] public oracleAddresses;
```

Oracle addresses

### getOracleInfo

```solidity theme={null}
mapping(address => struct IOraclesManager.OracleInfo) public getOracleInfo;
```

Maps an oracle address to the oracle details

***

## Functions

### initialize

```solidity theme={null}
function initialize(
    uint8 _minConfirmations,
    uint8 _excessConfirmations
) internal
```

Constructor that initializes the most important configurations.

#### Parameters:

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

***

### setMinConfirmations

```solidity theme={null}
function setMinConfirmations(
    uint8 _minConfirmations
) external
```

Sets minimal required confirmations.

#### Parameters:

| Name               | Type  | Description                     |
| ------------------ | ----- | ------------------------------- |
| \_minConfirmations | uint8 | Minimal required confirmations. |

***

### setExcessConfirmations

```solidity theme={null}
function setExcessConfirmations(
    uint8 _excessConfirmations
) external
```

Sets minimal required confirmations in case of too many confirmations.

#### Parameters:

| Name                  | Type  | Description                                             |
| --------------------- | ----- | ------------------------------------------------------- |
| \_excessConfirmations | uint8 | Minimal confirmations in case of too many confirmations |

***

### addOracles

```solidity theme={null}
function addOracles(
    address[] _oracles,
    bool[] _required
) external
```

Add oracles.

#### Parameters:

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

***

### updateOracle

```solidity theme={null}
function updateOracle(
    address _oracle,
    bool _isValid,
    bool _required
) external
```

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 true, a transfer will not be confirmed without this oracle. |
