Skip to content

Commit

Permalink
Adopt the same nomenclature as EIP-7867
Browse files Browse the repository at this point in the history
  • Loading branch information
duncancmt committed Feb 22, 2025
1 parent 4db45e4 commit 8da4771
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/multicall/MultiCall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pragma solidity =0.8.28;
/// reverts.
enum RevertPolicy {
REVERT, // Bubble the revert, undoing the entire multicall/batch. `contextdepth` is ignored
STOP, // Don't revert, but end the multicall/batch immediately. Subsequent calls are not
HALT, // Don't revert, but end the multicall/batch immediately. Subsequent calls are not
// executed. An OOG revert is always bubbled
CONTINUE // Ignore the revert and continue with the batch. The corresponding `Result` will have
// `success = false`. An OOG revert is always bubbled
Expand Down Expand Up @@ -393,7 +393,7 @@ contract MultiCall {
(bool success, bytes memory returndata) = target.safeCall(value, data, sender, contextdepth);
result.set(j, success, returndata);
if (!success) {
if (revertPolicy == uint8(RevertPolicy.STOP)) {
if (revertPolicy == uint8(RevertPolicy.HALT)) {
result.unsafeTruncate(j); // This results in `returndata` with gaps.
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/multicall/MultiCallContext.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Context} from "../Context.sol";
interface IMultiCall {
enum RevertPolicy {
REVERT,
STOP,
HALT,
CONTINUE
}

Expand Down

0 comments on commit 8da4771

Please sign in to comment.