Skip to content

Commit

Permalink
bubble up error
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongeric committed Dec 5, 2023
1 parent ade91d1 commit 0c3849c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
288585
288593
Original file line number Diff line number Diff line change
@@ -1 +1 @@
291179
291187
Original file line number Diff line number Diff line change
@@ -1 +1 @@
340631
340639
9 changes: 7 additions & 2 deletions src/reactors/RelayOrderReactor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ contract RelayOrderReactor is ReactorEvents, ReactorErrors, ReentrancyGuard, IRe
for (uint256 j = 0; j < actionsLength;) {
(address target, uint256 value, bytes memory data) =
abi.decode(order.actions[j], (address, uint256, bytes));
(bool success,) = target.call{value: value}(data);
if (!success) revert CallFailed();
(bool success, bytes memory result) = target.call{value: value}(data);
if (!success) {
// bubble up all errors, including custom errors which are encoded like functions
assembly {
revert(add(result, 0x20), mload(result))
}
}
unchecked {
j++;
}
Expand Down

0 comments on commit 0c3849c

Please sign in to comment.