# ChainlinkOracleWrapper

Reads a Chainlink oracle value & wrap it under the standard Chi oracle interface

## Functions

### constructor

```solidity
function constructor(
    address _core,
    address _chainlinkOracle
) public
```

ChainlinkOracleWrapper constructor

#### Parameters

| Name               | Type    | Description                              |
| ------------------ | ------- | ---------------------------------------- |
| `_core`            | address | Chi Core for reference                   |
| `_chainlinkOracle` | address | reference to the target Chainlink oracle |

### \_init

```solidity
function _init() internal
```

### update

```solidity
function update() external
```

updates the oracle price

no-op, Chainlink is updated automatically

### isOutdated

```solidity
function isOutdated() external returns (bool)
```

determine if read value is stale

#### Return Values

| Name  | Type | Description                 |
| ----- | ---- | --------------------------- |
| `[0]` | bool | true if read value is stale |

### read

```solidity
function read() external returns (struct Decimal.D256, bool)
```

read the oracle price

#### Return Values

| Name  | Type                | Description            |
| ----- | ------------------- | ---------------------- |
| `[0]` | struct Decimal.D256 | oracle price           |
| `[1]` | bool                | true if price is valid |
