@@ -3,16 +3,15 @@ pragma solidity 0.8.26;
33
44import { Algorithm2 } from "@async-swap/algorithms/algorithm-2.sol " ;
55import { IAlgorithm } from "@async-swap/interfaces/IAlgorithm.sol " ;
6- import { IAsyncSwapAMM, IAsyncSwapOrder } from "@async-swap/interfaces/IAsyncSwapAMM.sol " ;
7- import { IRouter } from "@async-swap/interfaces/IRouter.sol " ;
6+ import { IAsyncSwapAMM } from "@async-swap/interfaces/IAsyncSwapAMM.sol " ;
87import { AsyncFiller } from "@async-swap/libraries/AsyncFiller.sol " ;
98import { AsyncOrder } from "@async-swap/types/AsyncOrder.sol " ;
109import { CurrencySettler } from "@uniswap/v4-core/test/utils/CurrencySettler.sol " ;
1110import { IPoolManager } from "v4-core/interfaces/IPoolManager.sol " ;
1211import { Hooks } from "v4-core/libraries/Hooks.sol " ;
1312import { LPFeeLibrary } from "v4-core/libraries/LPFeeLibrary.sol " ;
1413import { SafeCast } from "v4-core/libraries/SafeCast.sol " ;
15- import { BeforeSwapDelta, BeforeSwapDeltaLibrary, toBeforeSwapDelta } from "v4-core/types/BeforeSwapDelta.sol " ;
14+ import { BeforeSwapDelta, toBeforeSwapDelta } from "v4-core/types/BeforeSwapDelta.sol " ;
1615import { Currency } from "v4-core/types/Currency.sol " ;
1716import { PoolId } from "v4-core/types/PoolId.sol " ;
1817import { PoolIdLibrary, PoolKey } from "v4-core/types/PoolKey.sol " ;
@@ -31,7 +30,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
3130 /// @notice Mapping to store async orders.
3231 mapping (PoolId poolId => AsyncFiller.State) public asyncOrders;
3332 /// Ordering algortim
34- IAlgorithm public immutable algorithm ;
33+ IAlgorithm public immutable ALGORITHM ;
3534
3635 /// Event emitted when a swap is executed.
3736 /// @param id The poolId of the pool where the swap occurred.
@@ -56,14 +55,14 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
5655 /// Initializes the Async Swap Hook contract with the PoolManager address and sets an transaction ordering algorithm.
5756 /// @param poolManager The address of the PoolManager contract.
5857 constructor (IPoolManager poolManager ) BaseHook (poolManager) {
59- algorithm = new Algorithm2 (address (this ));
58+ ALGORITHM = new Algorithm2 (address (this ));
6059 }
6160
6261 /// @inheritdoc BaseHook
6362 function _beforeInitialize (address , PoolKey calldata key , uint160 ) internal virtual override returns (bytes4 ) {
6463 require (key.fee == LPFeeLibrary.DYNAMIC_FEE_FLAG, "Dude use dynamic fees flag " );
6564 /// set algorithm for the pool being initialized
66- asyncOrders[key.toId ()].algorithm = algorithm ;
65+ asyncOrders[key.toId ()].algorithm = ALGORITHM ;
6766 asyncOrders[key.toId ()].poolManager = poolManager;
6867 return this .beforeInitialize.selector ;
6968 }
0 commit comments