Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
801b6ce
add plugin calldata to router
IliaAzhel Mar 31, 2025
f6a34ee
add plugin data to nftpm
IliaAzhel Mar 31, 2025
3638747
import callback struct to mock plugin
IliaAzhel Mar 31, 2025
767fdd9
remove chunk size & add plugin data forward field to swapcallback struct
IliaAzhel Apr 1, 2025
5be0ab1
handle empty arrays in skipPluginDataElement
IliaAzhel Apr 2, 2025
ef1865b
add router gas tests
IliaAzhel Apr 2, 2025
8241812
move skipPluginDataElement out of exactOutputInternal
IliaAzhel Apr 2, 2025
bdd10a3
fix farming test & fix snapshots
IliaAzhel Apr 2, 2025
3bc1bcc
add some natspecs
IliaAzhel Apr 7, 2025
f5045ff
update tests
IliaAzhel Apr 7, 2025
80a0dec
update swap router natspecs
IliaAzhel Apr 7, 2025
2af3ce4
update periphery package version
IliaAzhel May 15, 2025
1b72c64
add plugin data in quoter
fourlen May 15, 2025
e8ce3dd
tmp
fourlen May 16, 2025
4db9bcb
mb prigoditsa
fourlen May 19, 2025
30106b5
Revert "mb prigoditsa"
fourlen May 19, 2025
d4e15dd
Revert "tmp"
fourlen May 19, 2025
bb78a37
fix
fourlen May 19, 2025
0e8db30
return back pool init code hash
fourlen May 19, 2025
37ed90e
Merge pull request #147 from cryptoalgebra/quoter-plugins-data
debych May 19, 2025
48cbd9d
fix tests
fourlen May 19, 2025
5c83ac7
add swapFees event
IliaAzhel Jun 19, 2025
7ff8905
add pluginDeployer immutable to AlgebraPool
IliaAzhel Jun 19, 2025
ff98e1f
update snapshots
IliaAzhel Jun 19, 2025
583bcaa
update version in natspec
IliaAzhel Jun 19, 2025
406dd4c
bump packages version
IliaAzhel Jun 19, 2025
f0228dd
update algebra interface mcall
IliaAzhel Jun 20, 2025
559eb8f
add BurnFee event
IliaAzhel Jun 23, 2025
ac7fee6
new package version
IliaAzhel Jun 23, 2025
29a90f1
Revert "add pluginDeployer immutable to AlgebraPool"
IliaAzhel Jun 30, 2025
c03fc1c
update SwapFee and BurnFee events
IliaAzhel Jun 30, 2025
2fb3023
upfate snapshots
IliaAzhel Jun 30, 2025
a5598b8
update packages version
IliaAzhel Jun 30, 2025
b2ab08b
update core tests snapshots
IliaAzhel Jul 4, 2025
580bfb0
add prepublishOnly script and publish 1.2.9
debych Jul 21, 2025
81d855a
update integral v1.2.2 docs
IliaAzhel Jul 23, 2025
6d9fb14
Merge branch 'integral-v1.2.2' of https://github.com/cryptoalgebra/Al…
IliaAzhel Jul 23, 2025
d51161a
Merge branch 'integral-v1.2.2' into plugin-calldata-periphery
IliaAzhel Oct 17, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Checks
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
Codespell:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/echidna_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Echidna Core
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
IntegrationInvariants:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/echidna_farming.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Echidna Farming
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
UnitAsserts:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/echidna_periphery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Echidna Periphery
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
UnitAsserts:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/echidna_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Echidna Plugin
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
UnitAsserts:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Autotests Core
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
Autotests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_farmings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Autotests Farmings
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
Autotests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_periphery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Autotests Periphery
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
Autotests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Autotests Plugin
on:
push:
branches:
- integral-v1.2.1
- integral-v1.2.2
pull_request:
branches:
- integral-v1.2.1
- integral-v1.2.2

jobs:
Autotests:
Expand Down
2 changes: 1 addition & 1 deletion deploys.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{"poolDeployer":"0x578Eb01f7553689952B4A6194A8229E85955D47f","factory":"0x9548F884eC3737088796f91aec95d434e71229b0","vault":"0x7BDA9347Ba87A159e881679cfe5Bf39b80579C07","vaultFactory":"0x206fcA591F1A225667b7d269CA8773E4C4Ef5E59","BasePluginV1Factory":"0xCc486a16f069D6618c007eFCde79B9A817cBc41A","wrapped":"0x4200000000000000000000000000000000000006","entryPoint":"0x58aB9482D1687844602cAc637b2eEa5dDebD5583","tickLens":"0x1afd3e533278f627891c3D21997514e82B327fEC","quoter":"0x7ed5739C642aD9e6098815b819cA8111FA9E70dD","quoterV2":"0x428Be1356f68a31E867b6478dfA9AA76914a5834","swapRouter":"0x1E23BF717Ae4385B4494AaAe866e91568c0ac763","nftDescriptor":"0x3471870A22F8D1d5355714AfC034DD2C911F56aD","proxy":"0x982b9f8B80ed9E351cf9cCCB2Ce870b8E4Eec801","admin":"0xDeaD1F5aF792afc125812E875A891b038f888258","nonfungiblePositionManager":"0x645302e6E95F1441415a879DA24A110d14C94B2E","mcall":"0x49af1aCbB203019f048E03c808D16F011BC1CA8F","eternal":"0x8d5413c086d14b04A90aA913a4e12f2331EF7Fad","fc":"0xdbB7Fa758662400F8081a71fcfA1A09A11920A9a"}
7 changes: 4 additions & 3 deletions docs/Contracts/Core/AlgebraCommunityVault.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Algebra community fee vault
Community fee from pools is sent here, if it is enabled

*Developer note: Role system is used to withdraw tokens
Version: Algebra Integral*
Version: Algebra Integral 1.2.2*

**Inherits:** [IAlgebraCommunityVault](interfaces/IAlgebraCommunityVault.md)
**Inherits:** [IAlgebraCommunityVault](interfaces/vault/IAlgebraCommunityVault.md)
## Modifiers
### onlyAdministrator

Expand Down Expand Up @@ -118,13 +118,14 @@ Address of Algebra fee manager
### constructor

```solidity
constructor(address _algebraFeeManager) public
constructor(address _factory, address _algebraFeeManager) public
```



| Name | Type | Description |
| ---- | ---- | ----------- |
| _factory | address | |
| _algebraFeeManager | address | |

### withdraw
Expand Down
114 changes: 100 additions & 14 deletions docs/Contracts/Core/AlgebraFactory.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Algebra factory

Is used to deploy pools and its plugins

*Developer note: Version: Algebra Integral*
*Developer note: Version: Algebra Integral 1.2.2*

**Inherits:** [IAlgebraFactory](interfaces/IAlgebraFactory.md) [Ownable2Step](https://docs.openzeppelin.com/contracts/4.x/) [AccessControlEnumerable](https://docs.openzeppelin.com/contracts/4.x/)
**Inherits:** [IAlgebraFactory](interfaces/IAlgebraFactory.md) [Ownable2Step](https://docs.openzeppelin.com/contracts/4.x/) [AccessControlEnumerable](https://docs.openzeppelin.com/contracts/4.x/) [ReentrancyGuard](https://docs.openzeppelin.com/contracts/4.x/)

## Public variables
### POOLS_ADMINISTRATOR_ROLE
Expand All @@ -21,22 +21,22 @@ bytes32 constant POOLS_ADMINISTRATOR_ROLE = 0xb73ce166ead2f8e9add217713a7989e4ed
role that can change communityFee and tickspacing in pools


### poolDeployer
### CUSTOM_POOL_DEPLOYER
```solidity
address immutable poolDeployer
bytes32 constant CUSTOM_POOL_DEPLOYER = 0xc9cf812513d9983585eb40fcfe6fd49fbb6a45815663ec33b30a6c6c7de3683b
```
**Selector**: `0x3119049a`
**Selector**: `0x07810754`

Returns the current poolDeployerAddress
role that can call `createCustomPool` function


### communityVault
### poolDeployer
```solidity
address immutable communityVault
address immutable poolDeployer
```
**Selector**: `0x53e97868`
**Selector**: `0x3119049a`

Returns the current communityVaultAddress
Returns the current poolDeployerAddress


### defaultCommunityFee
Expand Down Expand Up @@ -83,6 +83,17 @@ contract IAlgebraPluginFactory defaultPluginFactory

Return the current pluginFactory address

*Developer note: This contract is used to automatically set a plugin address in new liquidity pools*

### vaultFactory
```solidity
contract IAlgebraVaultFactory vaultFactory
```
**Selector**: `0xd8a06f73`

Return the current vaultFactory address

*Developer note: This contract is used to automatically set a vault address in new liquidity pools*

### poolByPair
```solidity
Expand All @@ -94,9 +105,19 @@ Returns the pool address for a given pair of tokens, or address 0 if it does not

*Developer note: tokenA and tokenB may be passed in either token0/token1 or token1/token0 order*

### customPoolByPair
```solidity
mapping(address => mapping(address => mapping(address => address))) customPoolByPair
```
**Selector**: `0x23da36cc`

Returns the custom pool address for a customDeployer and a given pair of tokens, or address 0 if it does not exist

*Developer note: tokenA and tokenB may be passed in either token0/token1 or token1/token0 order*

### POOL_INIT_CODE_HASH
```solidity
bytes32 constant POOL_INIT_CODE_HASH = 0x177d5fbf994f4d130c008797563306f1a168dc689f81b2fa23b4396931014d91
bytes32 constant POOL_INIT_CODE_HASH = 0x62441ebe4e4315cf3d49d5957f94d66b253dbabe7006f34ad7f70947e60bf15c
```
**Selector**: `0xdc6fd8ab`

Expand Down Expand Up @@ -162,7 +183,7 @@ function defaultConfigurationForPool() external view returns (uint16 communityFe
```
**Selector**: `0x25b355d6`

Returns the default communityFee and tickspacing
Returns the default communityFee, tickspacing, fee and communityFeeVault for pool

**Returns:**

Expand Down Expand Up @@ -194,12 +215,35 @@ Deterministically computes the pool address given the token0 and token1
| ---- | ---- | ----------- |
| pool | address | The contract address of the Algebra pool |

### computeCustomPoolAddress

```solidity
function computeCustomPoolAddress(address deployer, address token0, address token1) public view returns (address customPool)
```
**Selector**: `0x1ba89df4`

Deterministically computes the custom pool address given the customDeployer, token0 and token1

*Developer note: The method does not check if such a pool has been created*

| Name | Type | Description |
| ---- | ---- | ----------- |
| deployer | address | |
| token0 | address | first token |
| token1 | address | second token |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| customPool | address | The contract address of the Algebra pool |

### createPool

```solidity
function createPool(address tokenA, address tokenB) external returns (address pool)
function createPool(address tokenA, address tokenB, bytes data) external returns (address pool)
```
**Selector**: `0xe3433615`
**Selector**: `0x321935c6`

Creates a pool for the given two tokens

Expand All @@ -210,13 +254,40 @@ The call will revert if the pool already exists or the token arguments are inval
| ---- | ---- | ----------- |
| tokenA | address | One of the two tokens in the desired pool |
| tokenB | address | The other of the two tokens in the desired pool |
| data | bytes | Data for plugin creation |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| pool | address | The address of the newly created pool |

### createCustomPool

```solidity
function createCustomPool(address deployer, address creator, address tokenA, address tokenB, bytes data) external returns (address customPool)
```
**Selector**: `0xdbbf3db4`

Creates a custom pool for the given two tokens using `deployer` contract

*Developer note: tokenA and tokenB may be passed in either order: token0/token1 or token1/token0.
The call will revert if the pool already exists or the token arguments are invalid.*

| Name | Type | Description |
| ---- | ---- | ----------- |
| deployer | address | The address of plugin deployer, also used for custom pool address calculation |
| creator | address | The initiator of custom pool creation |
| tokenA | address | One of the two tokens in the desired pool |
| tokenB | address | The other of the two tokens in the desired pool |
| data | bytes | The additional data bytes |

**Returns:**

| Name | Type | Description |
| ---- | ---- | ----------- |
| customPool | address | The address of the newly created custom pool |

### setDefaultCommunityFee

```solidity
Expand Down Expand Up @@ -277,6 +348,21 @@ function setDefaultPluginFactory(address newDefaultPluginFactory) external
| ---- | ---- | ----------- |
| newDefaultPluginFactory | address | address of new plugin factory |

### setVaultFactory

```solidity
function setVaultFactory(address newVaultFactory) external
```
**Selector**: `0x3ea7fbdb`



*Developer note: updates vaultFactory address*

| Name | Type | Description |
| ---- | ---- | ----------- |
| newVaultFactory | address | address of new vault factory |

### startRenounceOwnership

```solidity
Expand Down
Loading