fix: Restrict receive callers to have code

--- don't change below this line ---
ENG-4260 Took 8 minutes
This commit is contained in:
Diana Carvalho
2025-02-25 09:36:04 +00:00
parent dd6b1151b2
commit 801976fafa

View File

@@ -432,7 +432,9 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
/**
* @dev Allows this contract to receive native token
*/
receive() external payable {}
receive() external payable {
require(msg.sender.code.length != 0);
}
/**
* @dev Called by UniswapV3 pool when swapping on it.