Merge branch 'main' into router/tnl/ENG-4034-usv3-executor

This commit is contained in:
Tamara
2025-01-30 10:33:18 -05:00
committed by GitHub
4 changed files with 29 additions and 40 deletions

View File

@@ -79,7 +79,17 @@ contract TychoRouter is
* caller is not a pool.
*/
fallback() external {
// TODO execute generic callback
_executeGenericCallback(msg.data);
}
/**
* @dev Check if the sender is correct and executes callback actions.
* @param msgData encoded data. It must includes data for the verification.
*/
function _executeGenericCallback(bytes calldata msgData) internal {
(uint256 amountOwed, address tokenOwed) = _callVerifyCallback(msgData);
IERC20(tokenOwed).safeTransfer(msg.sender, amountOwed);
}
/**