diff --git a/.changeset/cyan-taxis-travel.md b/.changeset/cyan-taxis-travel.md new file mode 100644 index 00000000000..bd90e07f3f3 --- /dev/null +++ b/.changeset/cyan-taxis-travel.md @@ -0,0 +1,5 @@ +--- +'openzeppelin-solidity': minor +--- + +`Address`: bubble up revert data on `sendValue` failed call diff --git a/contracts/utils/Address.sol b/contracts/utils/Address.sol index a1c8af296ce..d8e88749148 100644 --- a/contracts/utils/Address.sol +++ b/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); } }