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

Semaphore.sol is not much Gas Optimized. #112

Closed
TradMod opened this issue Jul 25, 2022 · 1 comment · Fixed by #113
Closed

Semaphore.sol is not much Gas Optimized. #112

TradMod opened this issue Jul 25, 2022 · 1 comment · Fixed by #113
Assignees
Labels
performance 📈 A code change that improves the performance

Comments

@TradMod
Copy link
Contributor

TradMod commented Jul 25, 2022

Is your feature request related to a problem? Please describe.

Not a bug but can be a problem, as the Semaphore.sol includes some require statements with a err message, which will be too much gas costly. As it stores full-length strings

Describe the solution you'd like

A simple solution would be to use Custom Errors (with modifiers)

Describe alternatives you've considered

I think using Revert & Errors will be the best solution IA

Additional context

Add any other context or screenshots about the feature request here.

@TradMod TradMod added the feature 🚀 This is enhancing something existing or creating something new label Jul 25, 2022
@TradMod
Copy link
Contributor Author

TradMod commented Jul 25, 2022

I just made the Pull request with the solution and more gas-optimized contract :)
PR #113

Thanks,
AB Dee.

@cedoor cedoor moved this to 🏗 In Progress in Semaphore V2 Jul 25, 2022
@cedoor cedoor added performance 📈 A code change that improves the performance and removed feature 🚀 This is enhancing something existing or creating something new labels Jul 25, 2022
@cedoor cedoor linked a pull request Jul 25, 2022 that will close this issue
2 tasks
Repository owner moved this from 🏗 In Progress to ✔️ Done in Semaphore V2 Jul 25, 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 a pull request may close this issue.

2 participants