Merge pull request #83 from propeller-heads/router/dc/ENG-4260-improve-receive

fix: Restrict receive callers to have code
This commit is contained in:
dianacarvalho1
2025-02-26 09:42:47 +00:00
committed by GitHub

View File

@@ -472,7 +472,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.