From 72553bf98d432963851c07fba10b91f42ab7a3e6 Mon Sep 17 00:00:00 2001 From: die-herdplatte <173669014+die-herdplatte@users.noreply.github.com> Date: Tue, 17 Jun 2025 11:34:31 +0200 Subject: [PATCH] Fix slither issues --- foundry/lib/ekubo/types/poolKey.sol | 1 + foundry/src/executors/EkuboExecutor.sol | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/foundry/lib/ekubo/types/poolKey.sol b/foundry/lib/ekubo/types/poolKey.sol index ad375a4..a3f2bc3 100644 --- a/foundry/lib/ekubo/types/poolKey.sol +++ b/foundry/lib/ekubo/types/poolKey.sol @@ -14,6 +14,7 @@ struct PoolKey { } function extension(Config config) pure returns (address e) { + // slither-disable-next-line assembly assembly ("memory-safe") { e := shr(96, config) } diff --git a/foundry/src/executors/EkuboExecutor.sol b/foundry/src/executors/EkuboExecutor.sol index f149234..e072810 100644 --- a/foundry/src/executors/EkuboExecutor.sol +++ b/foundry/src/executors/EkuboExecutor.sol @@ -21,6 +21,7 @@ contract EkuboExecutor is ICallback, RestrictTransferFrom { + error EkuboExecutor__AddressZero(); error EkuboExecutor__InvalidDataLength(); error EkuboExecutor__CoreOnly(); error EkuboExecutor__UnknownCallback(); @@ -44,6 +45,10 @@ contract EkuboExecutor is address _permit2 ) RestrictTransferFrom(_permit2) { core = ICore(_core); + + if (_mevResist == address(0)) { + revert EkuboExecutor__AddressZero(); + } mevResist = _mevResist; } @@ -175,6 +180,7 @@ contract EkuboExecutor is (int128, int128) ); } else { + // slither-disable-next-line calls-loop (delta0, delta1) = core.swap_611415377( pk, nextAmountIn, @@ -201,6 +207,7 @@ contract EkuboExecutor is ) internal returns (bytes memory result) { address target = address(core); + // slither-disable-next-line assembly assembly ("memory-safe") { // We will store result where the free memory pointer is now, ... result := mload(0x40)