Selaa lähdekoodia

Release v5.2 update before final release (#5418)

Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Simka <0xsimka@gmail.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
Co-authored-by: Voronor <129545215+voronor@users.noreply.github.com>
Co-authored-by: Ernesto García <ernestognw@gmail.com>
Hadrien Croubois 9 kuukautta sitten
vanhempi
sitoutus
0cc8dcfb53

+ 5 - 0
.changeset/cyan-taxis-travel.md

@@ -0,0 +1,5 @@
+---
+'openzeppelin-solidity': minor
+---
+
+`Address`: bubble up revert data on `sendValue` failed call

+ 2 - 2
contracts/account/utils/draft-ERC4337Utils.sol

@@ -115,7 +115,7 @@ library ERC4337Utils {
         return uint128(self.accountGasLimits.extract_32_16(0));
     }
 
-    /// @dev Returns `accountGasLimits` from the {PackedUserOperation}.
+    /// @dev Returns `callGasLimit` from the {PackedUserOperation}.
     function callGasLimit(PackedUserOperation calldata self) internal pure returns (uint256) {
         return uint128(self.accountGasLimits.extract_32_16(16));
     }
@@ -155,7 +155,7 @@ library ERC4337Utils {
         return self.paymasterAndData.length < 52 ? 0 : uint128(bytes16(self.paymasterAndData[36:52]));
     }
 
-    /// @dev Returns the forth section of `paymasterAndData` from the {PackedUserOperation}.
+    /// @dev Returns the fourth section of `paymasterAndData` from the {PackedUserOperation}.
     function paymasterData(PackedUserOperation calldata self) internal pure returns (bytes calldata) {
         return self.paymasterAndData.length < 52 ? _emptyCalldataBytes() : self.paymasterAndData[52:];
     }

+ 2 - 2
contracts/interfaces/draft-IERC7579.sol

@@ -121,7 +121,7 @@ interface IERC7579Execution {
      * MUST ensure adequate authorization control: e.g. onlyEntryPointOrSelf if used with ERC-4337
      * If a mode is requested that is not supported by the Account, it MUST revert
      */
-    function execute(bytes32 mode, bytes calldata executionCalldata) external;
+    function execute(bytes32 mode, bytes calldata executionCalldata) external payable;
 
     /**
      * @dev Executes a transaction on behalf of the account.
@@ -136,7 +136,7 @@ interface IERC7579Execution {
     function executeFromExecutor(
         bytes32 mode,
         bytes calldata executionCalldata
-    ) external returns (bytes[] memory returnData);
+    ) external payable returns (bytes[] memory returnData);
 }
 
 /**

+ 2 - 2
contracts/utils/Address.sol

@@ -35,9 +35,9 @@ library Address {
             revert Errors.InsufficientBalance(address(this).balance, amount);
         }
 
-        (bool success, ) = recipient.call{value: amount}("");
+        (bool success, bytes memory returndata) = recipient.call{value: amount}("");
         if (!success) {
-            revert Errors.FailedCall();
+            _revert(returndata);
         }
     }