Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions .eslintrc.cjs

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,18 @@ jobs:
check_filenames: true
skip: package-lock.json,node_modules,Base64.spec.ts.snap
only_warn: 1

Prettier:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-node@v7
with:
node-version: 24
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm run ci-install
- run: npm run lint
9 changes: 3 additions & 6 deletions .github/workflows/echidna_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ jobs:
echidna-version: v2.3.3
files: ./src/core/contracts/test/echidna/PoolMockEchidna/${{ matrix.testName }}.sol
contract: ${{ matrix.testName }}
crytic-args: --hardhat-ignore-compile
solc-args: --evm-version paris
solc-args: --evm-version cancun
config: ./src/core/contracts/test/echidna/PoolMockEchidna/echidna-property.config.yml

IntegrationAsserts:
Expand Down Expand Up @@ -95,8 +94,7 @@ jobs:
echidna-version: v2.3.3
files: ./src/core/contracts/test/echidna/PoolMockEchidna/${{ matrix.testName }}.sol
contract: ${{ matrix.testName }}
crytic-args: --hardhat-ignore-compile
solc-args: --evm-version paris
solc-args: --evm-version cancun
config: ./src/core/contracts/test/echidna/PoolMockEchidna/echidna-assert.config.yml

UnitAsserts:
Expand Down Expand Up @@ -144,6 +142,5 @@ jobs:
echidna-version: v2.3.3
files: ./src/core/contracts/test/echidna/${{ matrix.testName }}.sol
contract: ${{ matrix.testName }}
crytic-args: --hardhat-ignore-compile
solc-args: --evm-version paris
solc-args: --evm-version cancun
config: ./src/core/contracts/test/echidna/echidna.config.yml
1 change: 0 additions & 1 deletion .github/workflows/echidna_farming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,4 @@ jobs:
files: ./src/farming/
contract: ${{ matrix.testName }}
crytic-args: --hardhat-ignore-compile
solc-args: --evm-version paris
config: ./src/farming/contracts/test/echidna/echidna.config.yml
1 change: 0 additions & 1 deletion .github/workflows/echidna_periphery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,4 @@ jobs:
echidna-version: v2.3.3
files: ./src/periphery/
contract: ${{ matrix.testName }}
solc-args: --evm-version paris
config: ./src/periphery/contracts/test/echidna/echidna.config.yml
5 changes: 0 additions & 5 deletions .huskyrc.json

This file was deleted.

5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
typechain/
typechain/
# prettier-plugin-solidity fails on the comment in the empty interface body
src/core/contracts/interfaces/IAlgebraPool.sol
src/core/contracts/interfaces/IAlgebraPoolLegacy.sol
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ $ npm run coverage
```

## Deploy
The contracts are compiled for the Cancun EVM version (`MCOPY` opcode), so the network must support Cancun.

Firstly you need to create `.env` file in the root directory of project as in `env.example`.

To deploy all modules in specific network:
Expand Down
7 changes: 3 additions & 4 deletions docs/Contracts/Core/AlgebraPool.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ function setCommunityVault(address) external

Set new community fee vault address. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

*Developer note: Community fee vault receives collected community fees.
**accumulated but not yet sent to the vault community fees once will be sent to the `newCommunityVault` address***
*Developer note: The vault claims community fees with `claimCommunityFee`, unclaimed ones only by the `newCommunityVault`.
The zero address also sets the community fee to zero*

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand All @@ -313,8 +313,7 @@ function setFee(uint16) external
```
**Selector**: `0x8e005553`

Set new pool fee. Can be called by owner if dynamic fee is disabled.
Called by the plugin if dynamic fee is enabled
Set new pool fee if dynamic fee is disabled. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand Down
11 changes: 4 additions & 7 deletions docs/Contracts/Core/AlgebraPoolExtension.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ Algebra pool extension

Contains pool initialization and permissioned setter logic, called via delegatecall from pool

*Developer note: IMPORTANT: This extension is currently designed only for logic that does not require token0/token1 or other pool immutables.
If additional logic that depends on token addresses needs to be moved here (e.g. flash),
getDeployParameters must be updated to provide those values
*Developer note: The pool immutables except `factory` are zero here, see `_getDeployParameters`
Version: Algebra Integral 1.3*

**Inherits:** [AlgebraPoolBase](base/AlgebraPoolBase.md) ReentrancyGuard
Expand Down Expand Up @@ -367,8 +365,8 @@ function setCommunityVault(address newCommunityVault) external

Set new community fee vault address. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

*Developer note: Community fee vault receives collected community fees.
**accumulated but not yet sent to the vault community fees once will be sent to the `newCommunityVault` address***
*Developer note: The vault claims community fees with `claimCommunityFee`, unclaimed ones only by the `newCommunityVault`.
The zero address also sets the community fee to zero*

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand All @@ -381,8 +379,7 @@ function setFee(uint16 newFee) external
```
**Selector**: `0x8e005553`

Set new pool fee. Can be called by owner if dynamic fee is disabled.
Called by the plugin if dynamic fee is enabled
Set new pool fee if dynamic fee is disabled. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/Contracts/Core/interfaces/plugin/IAlgebraPlugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Returns plugin config

| Name | Type | Description |
| ---- | ---- | ----------- |
| [0] | uint16 | config Each bit of the config is responsible for enabling/disabling the hooks. The last bit indicates whether the plugin contains dynamic fees logic |
| [0] | uint16 | config Bitmap of enabled hooks and features, see `Plugins` |

### beforeInitialize

Expand Down
2 changes: 1 addition & 1 deletion docs/Contracts/Core/interfaces/pool/IAlgebraPoolEvents.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Emitted when the community vault address changes
event CommunityFeeTransfer(address communityVault, uint256 communityFeeAmount0, uint256 communityFeeAmount1)
```

Emitted when community fees are distributed from the pool
Emitted when the community vault claims the community fees

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ function setCommunityVault(address newCommunityVault) external

Set new community fee vault address. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

*Developer note: Community fee vault receives collected community fees.
**accumulated but not yet sent to the vault community fees once will be sent to the `newCommunityVault` address***
*Developer note: The vault claims community fees with `claimCommunityFee`, unclaimed ones only by the `newCommunityVault`.
The zero address also sets the community fee to zero*

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand All @@ -102,8 +102,7 @@ function setFee(uint16 newFee) external
```
**Selector**: `0x8e005553`

Set new pool fee. Can be called by owner if dynamic fee is disabled.
Called by the plugin if dynamic fee is enabled
Set new pool fee if dynamic fee is disabled. Only factory owner or POOLS_ADMINISTRATOR_ROLE role

| Name | Type | Description |
| ---- | ---- | ----------- |
Expand Down
8 changes: 4 additions & 4 deletions docs/Contracts/Periphery/interfaces/IQuoterV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Returns the amount out received for a given exact input swap without executing t
| sqrtPriceX96AfterList | uint160[] | List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| feeList | uint16[] | List of the fee values used for swaps in the path |
| feeList | uint16[] | The pool fees (`lastFee`), the applied ones may differ with dynamic fee |

### quoteExactInputSingle

Expand All @@ -92,7 +92,7 @@ Returns the amount out received for a given exact input but for a swap of a sing
| sqrtPriceX96After | uint160 | The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| fee | uint16 | The fee value used for swap in the pool |
| fee | uint16 | The pool fee (`lastFee`), the applied one may differ with dynamic fee |

### quoteExactOutput

Expand All @@ -117,7 +117,7 @@ Returns the amount in required for a given exact output swap without executing t
| sqrtPriceX96AfterList | uint160[] | List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| feeList | uint16[] | List of the fee values used for swaps in the path |
| feeList | uint16[] | The pool fees (`lastFee`), the applied ones may differ with dynamic fee |

### quoteExactOutputSingle

Expand All @@ -141,5 +141,5 @@ Returns the amount in required to receive the given exact output amount but for
| sqrtPriceX96After | uint160 | The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| fee | uint16 | The fee value used for swap in the pool |
| fee | uint16 | The pool fee (`lastFee`), the applied one may differ with dynamic fee |

8 changes: 4 additions & 4 deletions docs/Contracts/Periphery/lens/QuoterV2.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Returns the amount out received for a given exact input but for a swap of a sing
| sqrtPriceX96After | uint160 | The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| fee | uint16 | The fee value used for swap in the pool |
| fee | uint16 | The pool fee (`lastFee`), the applied one may differ with dynamic fee |

### quoteExactInput

Expand All @@ -96,7 +96,7 @@ Returns the amount out received for a given exact input swap without executing t
| sqrtPriceX96AfterList | uint160[] | List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| feeList | uint16[] | List of the fee values used for swaps in the path |
| feeList | uint16[] | The pool fees (`lastFee`), the applied ones may differ with dynamic fee |

### quoteExactOutputSingle

Expand All @@ -120,7 +120,7 @@ Returns the amount in required to receive the given exact output amount but for
| sqrtPriceX96After | uint160 | The sqrt price of the pool after the swap |
| initializedTicksCrossed | uint32 | The number of initialized ticks that the swap crossed |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| fee | uint16 | The fee value used for swap in the pool |
| fee | uint16 | The pool fee (`lastFee`), the applied one may differ with dynamic fee |

### quoteExactOutput

Expand All @@ -145,5 +145,5 @@ Returns the amount in required for a given exact output swap without executing t
| sqrtPriceX96AfterList | uint160[] | List of the sqrt price after the swap for each pool in the path |
| initializedTicksCrossedList | uint32[] | List of the initialized ticks that the swap crossed for each pool in the path |
| gasEstimate | uint256 | The estimate of the gas that the swap consumes |
| feeList | uint16[] | List of the fee values used for swaps in the path |
| feeList | uint16[] | The pool fees (`lastFee`), the applied ones may differ with dynamic fee |

4 changes: 0 additions & 4 deletions env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
ETHERSCAN_API_KEY = ABSD123...
BSCSCAN_API_KEY = ABSD123...
MNEMONIC = "one two three ..."
INFURA_ID_PROJECT = "abcd1234..."

DEPLOY_GAS_LIMIT = 7000000
DEPLOY_GAS_PRICE = 150
Loading
Loading