Skip to content

Commit 40c91a0

Browse files
committed
fix: remove unused imports + use screaming case for immutable
1 parent a4453c3 commit 40c91a0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/AsyncSwap.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ pragma solidity 0.8.26;
33

44
import { Algorithm2 } from "@async-swap/algorithms/algorithm-2.sol";
55
import { 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";
87
import { AsyncFiller } from "@async-swap/libraries/AsyncFiller.sol";
98
import { AsyncOrder } from "@async-swap/types/AsyncOrder.sol";
109
import { CurrencySettler } from "@uniswap/v4-core/test/utils/CurrencySettler.sol";
1110
import { IPoolManager } from "v4-core/interfaces/IPoolManager.sol";
1211
import { Hooks } from "v4-core/libraries/Hooks.sol";
1312
import { LPFeeLibrary } from "v4-core/libraries/LPFeeLibrary.sol";
1413
import { 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";
1615
import { Currency } from "v4-core/types/Currency.sol";
1716
import { PoolId } from "v4-core/types/PoolId.sol";
1817
import { 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

Comments
 (0)