Skip to content

Commit 1f3df09

Browse files
committed
rename to isExecutor
1 parent 7cf3bdc commit 1f3df09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/AsyncSwap.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
102102

103103
function isExecutor(PoolId poolId, address user, address executor) external view returns (bool) {
104104
AsyncFiller.State storage state = asyncOrders[poolId];
105-
return state.setExecutor[user][executor];
105+
return state.isExecutor[user][executor];
106106
}
107107

108108
function calculateHookFee(uint256) public pure returns (uint256) {
@@ -190,7 +190,7 @@ contract AsyncSwap is BaseHook, IAsyncSwapAMM {
190190
/// @dev Take pool fee for LP
191191
uint256 feeAmount = calculatePoolFee(key.fee, amountTaken);
192192
uint256 finalTaken = amountTaken - feeAmount;
193-
asyncOrders[poolId].setExecutor[hookData.user][hookData.executor] = true;
193+
asyncOrders[poolId].isExecutor[hookData.user][hookData.executor] = true;
194194
emit AsyncSwapOrder(poolId, hookData.user, params.zeroForOne, finalTaken.toInt256());
195195

196196
/// @dev Issue 1:1 claimableAmount - pool fee to user

src/libraries/AsyncFiller.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ library AsyncFiller {
2727
IPoolManager poolManager;
2828
IAlgorithm algorithm;
2929
mapping(address user => mapping(bool zeroForOne => uint256 claimable)) asyncOrder;
30-
mapping(address owner => mapping(address executor => bool)) setExecutor;
30+
mapping(address owner => mapping(address executor => bool)) isExecutor;
3131
}
3232

3333
/// @notice Emitted when an async order is filled.
@@ -49,7 +49,7 @@ library AsyncFiller {
4949
/// @param executor The address of the executor to be checked.
5050
/// @return isExecutor True if the executor is valid for the async order, false otherwise.
5151
function isExecutor(AsyncOrder calldata order, State storage self, address executor) internal view returns (bool) {
52-
return self.setExecutor[order.owner][executor];
52+
return self.isExecutor[order.owner][executor];
5353
}
5454

5555
/// Fills async orders in batching mode, allowing multiple orders to be executed in a single transaction.

0 commit comments

Comments
 (0)