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