0

If there is a revert inside a for loop that is inside a function, and the revert is triggered, will the whole function revert?

1 Answer 1

1

Yes, a revert within a loop inside a function triggers a full function revert due to its stack-based execution model, rolling back all changes made within the function.

1
  • thanks I would upvote you but don't have 15 reputation points yet Sep 14, 2023 at 23:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.