Skip to content

Commit

Permalink
revert last op only if success=false
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Oct 4, 2024
1 parent e626212 commit e12bb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EntryPointSimulations.sol
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ contract EntryPointSimulations is EntryPoint, IEntryPointSimulations {

// revert only at last as we are estimating only the last call
if (i == ops.length - 1) {
if (returnData.length > 0) {
if (returnData.length > 0 && !success) {
assembly {
// Revert using the original error data, propagating the exact revert reason
revert(add(returnData, 0x20), mload(returnData))
Expand Down

0 comments on commit e12bb70

Please sign in to comment.