Bubble up revert data on failed `Address.sendValue` (#5379)

pull/5381/head
Arr00 1 month ago committed by GitHub
parent fad2b6e16b
commit 73b46e3bd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .changeset/cyan-taxis-travel.md
  2. 4
      contracts/utils/Address.sol

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

@ -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);
}
}

Loading…
Cancel
Save