Remove balanceOf checks in EkuboExecutor & remove ICallback impl

This commit is contained in:
die-herdplatte
2025-04-02 11:28:11 +07:00
parent f514871e61
commit 4e34f45bf4
2 changed files with 66 additions and 116 deletions

View File

@@ -557,9 +557,7 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
address executor = address(0xA612f60d3C49E5f13f0e067b14E0eD6656F3F279);
// slither-disable-next-line controlled-delegatecall,low-level-calls
(bool success, bytes memory result) = executor.delegatecall(
abi.encodeWithSelector(ICallback.handleCallback.selector, msg.data)
);
(bool success, bytes memory result) = executor.delegatecall(msg.data);
if (!success) {
revert(
@@ -570,15 +568,19 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
)
);
}
// slither-disable-next-line assembly
assembly ("memory-safe") {
// Propagate the swappedAmount
return(add(result, 32), 16)
}
}
function payCallback(uint256, address /*token*/ ) external {
address executor = address(0xA612f60d3C49E5f13f0e067b14E0eD6656F3F279);
// slither-disable-next-line controlled-delegatecall,low-level-calls
(bool success, bytes memory result) = executor.delegatecall(
abi.encodeWithSelector(ICallback.handleCallback.selector, msg.data)
);
(bool success, bytes memory result) = executor.delegatecall(msg.data);
if (!success) {
revert(