From 444fc2d7b01758fcbf1b0fb2fe72a73be0d16bac Mon Sep 17 00:00:00 2001 From: Diana Carvalho Date: Mon, 12 May 2025 10:48:07 +0100 Subject: [PATCH] docs: Add comment on receive() in CurveExecutor Took 9 minutes --- foundry/src/executors/CurveExecutor.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/foundry/src/executors/CurveExecutor.sol b/foundry/src/executors/CurveExecutor.sol index ef2af90..e10a213 100644 --- a/foundry/src/executors/CurveExecutor.sol +++ b/foundry/src/executors/CurveExecutor.sol @@ -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); }