fix: Restrict receive callers to have code
--- don't change below this line --- ENG-4260 Took 8 minutes
This commit is contained in:
@@ -432,7 +432,9 @@ contract TychoRouter is AccessControl, Dispatcher, Pausable, ReentrancyGuard {
|
|||||||
/**
|
/**
|
||||||
* @dev Allows this contract to receive native token
|
* @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.
|
* @dev Called by UniswapV3 pool when swapping on it.
|
||||||
|
|||||||
Reference in New Issue
Block a user