Skip to content

Little More Gas Optimization #118

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

Merged
merged 2 commits into from
Aug 18, 2022
Merged

Little More Gas Optimization #118

merged 2 commits into from
Aug 18, 2022

Conversation

TradMod
Copy link
Contributor

@TradMod TradMod commented Aug 17, 2022

Description

Even tho, unchecked in solidity is an old method to stay safe from over/underflow Maths. But still, this method isn't useless, It helps us to save a little bit of Gas :)

Related Issue

N/A

Does this introduce a breaking change?

  • Yes
  • No

Other information

For more info check this: https://ethereum.stackexchange.com/questions/113221/what-is-the-purpose-of-unchecked-in-solidity

Before:
semaphoreAfter

After:
semaphoreAfter2 0

Thanks,
AB Dee.

P.S All the tests are passing (some tests are not passing, not because of these changes)

@cedoor cedoor added the performance 📈 A code change that improves the performance label Aug 17, 2022
@cedoor
Copy link
Collaborator

cedoor commented Aug 17, 2022

Hey @DevABDee , thank you for this PR! Could you also run yarn prettier:write to format your code?

@TradMod
Copy link
Contributor Author

TradMod commented Aug 18, 2022

I actually did that but don't know why this bot is still failing. Anyway, I think this time it's much better as it's not touching any other line 😁

@cedoor cedoor merged commit 7390c28 into semaphore-protocol:main Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance 📈 A code change that improves the performance
Projects
No open projects
Status: ✔️ Done
Development

Successfully merging this pull request may close these issues.

2 participants