docs: Add comment on receive() in CurveExecutor

Took 9 minutes
This commit is contained in:
Diana Carvalho
2025-05-12 10:48:07 +01:00
parent f14c8ee29b
commit 444fc2d7b0

View File

@@ -149,6 +149,11 @@ contract CurveExecutor is IExecutor, TokenTransfer {
receiver = address(bytes20(data[65:85]));
}
/**
* @dev Even though this contract is mostly called through delegatecall, we still want to be able to receive ETH.
* This is needed when using the executor directly and it makes testing easier.
* There are some curve pools that take ETH directly.
*/
receive() external payable {
require(msg.sender.code.length != 0);
}