Skip to content

Commit

Permalink
Merge pull request #112 from cryptoalgebra/dev
Browse files Browse the repository at this point in the history
Algebra Integral 1.0
  • Loading branch information
0xVolosnikov committed Feb 12, 2024
2 parents da2d363 + a88725c commit 55dbb56
Show file tree
Hide file tree
Showing 97 changed files with 9,233 additions and 9,101 deletions.
2 changes: 1 addition & 1 deletion docs/Contracts/Plugin/interfaces/plugins/IFarmingPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Emitted when new activeIncentive is set
### pool

```solidity
function pool() external returns (address)
function pool() external view returns (address)
```
**Selector**: `0x16f0115b`

Expand Down
24 changes: 23 additions & 1 deletion docs/Contracts/Plugin/lens/AlgebraOracleV1TWAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Given a tick and a token amount, calculates the amount of token received in exch
### getAverageTick

```solidity
function getAverageTick(address pool, uint32 period) external view returns (int24 timeWeightedAverageTick)
function getAverageTick(address pool, uint32 period) external view returns (int24 timeWeightedAverageTick, bool isConnected)
```
**Selector**: `0x57f32330`

Expand All @@ -82,6 +82,7 @@ It is recommended to check the latest available timestamp using the `latest
| Name | Type | Description |
| ---- | ---- | ----------- |
| timeWeightedAverageTick | int24 | The time-weighted average tick from (block.timestamp - period) to block.timestamp |
| isConnected | bool | Is oracle currently connected to the pool. If disconnected data can be obsolete |

### latestTimestamp

Expand Down Expand Up @@ -140,6 +141,27 @@ Returns the index of last record written in the oracle
| ---- | ---- | ----------- |
| [0] | uint16 | |

### isOracleConnected

```solidity
function isOracleConnected(address pool) external view returns (bool connected)
```
**Selector**: `0x9905d9a5`

Whether or not the oracle is connected to the liquidity pool

*Developer note: Oracle should not be used if disconnected from pool*

| Name | Type | Description |
| ---- | ---- | ----------- |
| pool | address | |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| connected | bool | |

### oldestIndex

```solidity
Expand Down
24 changes: 23 additions & 1 deletion docs/Contracts/Plugin/lens/IAlgebraOracleV1TWAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Given a tick and a token amount, calculates the amount of token received in exch
### getAverageTick

```solidity
function getAverageTick(address pool, uint32 period) external view returns (int24 timeWeightedAverageTick)
function getAverageTick(address pool, uint32 period) external view returns (int24 timeWeightedAverageTick, bool isConnected)
```
**Selector**: `0x57f32330`

Expand All @@ -73,6 +73,7 @@ It is recommended to check the latest available timestamp using the `latest
| Name | Type | Description |
| ---- | ---- | ----------- |
| timeWeightedAverageTick | int24 | The time-weighted average tick from (block.timestamp - period) to block.timestamp |
| isConnected | bool | Is oracle currently connected to the pool. If disconnected data can be obsolete |

### latestTimestamp

Expand Down Expand Up @@ -150,3 +151,24 @@ Returns the index of oldest record available in the oracle
| ---- | ---- | ----------- |
| [0] | uint16 | |

### isOracleConnected

```solidity
function isOracleConnected(address pool) external view returns (bool connected)
```
**Selector**: `0x9905d9a5`

Whether or not the oracle is connected to the liquidity pool

*Developer note: Oracle should not be used if disconnected from pool*

| Name | Type | Description |
| ---- | ---- | ----------- |
| pool | address | |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| connected | bool | |

0 comments on commit 55dbb56

Please sign in to comment.