fix: Silence slither warnings
- low level calls are fine, since we are checking for success, and we have already checked for contract existence when setting swap executors - dead-code is silenced - fix solidity version
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: UNLICENSED
|
// SPDX-License-Identifier: UNLICENSED
|
||||||
pragma solidity >=0.7.5;
|
pragma solidity ^0.8.28;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ contract SwapExecutionDispatcher {
|
|||||||
* @dev Calls an executor, assumes swap.protocolData contains
|
* @dev Calls an executor, assumes swap.protocolData contains
|
||||||
* token addresses if required by the executor.
|
* token addresses if required by the executor.
|
||||||
*/
|
*/
|
||||||
|
// slither-disable-next-line dead-code
|
||||||
function _callSwapExecutor(uint256 amount, bytes calldata data)
|
function _callSwapExecutor(uint256 amount, bytes calldata data)
|
||||||
internal
|
internal
|
||||||
returns (uint256 calculatedAmount)
|
returns (uint256 calculatedAmount)
|
||||||
@@ -43,6 +44,7 @@ contract SwapExecutionDispatcher {
|
|||||||
revert SwapExecutionDispatcher__UnapprovedExecutor();
|
revert SwapExecutionDispatcher__UnapprovedExecutor();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// slither-disable-next-line low-level-calls
|
||||||
(bool success, bytes memory result) = executor.delegatecall(
|
(bool success, bytes memory result) = executor.delegatecall(
|
||||||
abi.encodeWithSelector(selector, amount, protocolData)
|
abi.encodeWithSelector(selector, amount, protocolData)
|
||||||
);
|
);
|
||||||
@@ -60,6 +62,7 @@ contract SwapExecutionDispatcher {
|
|||||||
calculatedAmount = abi.decode(result, (uint256));
|
calculatedAmount = abi.decode(result, (uint256));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// slither-disable-next-line dead-code
|
||||||
function _decodeExecutorAndSelector(bytes calldata data)
|
function _decodeExecutorAndSelector(bytes calldata data)
|
||||||
internal
|
internal
|
||||||
pure
|
pure
|
||||||
|
|||||||
Reference in New Issue
Block a user