Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EVMProofHelper.sol: Enhanced 'for' loops #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xScratch
Copy link

Description

This PR solely aims to Enhance these 'for' loops using unchecked block and changing i++ to ++i which do saves some amount of gas. This might help - https://gist.github.com/grGred/9bab8b9bad0cd42fc23d4e31e7347144#use-internal-view-functions-in-modifiers-to-save-bytecode

Tests

Didn't feel like adding any test cuz this is an obvious one, unchecked block is used when we know the loop has some finite indentations and thus it doesn't check for any 'underflows/overflows'

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant