unlock
unlock copied to clipboard
Contracts are pretty Gas Costly
Is your feature request related to a problem? Please describe.
Not a bug but can be a big problem. As the contracts like unlock.sol include so many require statements with a error message, it will be too much gas costly. As it stores full-length of strings
Describe the solution you'd like A simple solution would be to use Custom Errors instead
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.
Thank you! The gas issue of using strings only upon deployment, correct?
No, Many functions included require statements with a string msgs. So it will be like deployment + every time calling any of those functions which have the require statement init.
I made Pull request #9418 with the solution and more gas-optimized contract :) Thanks
Very good! Thanks for the clarification!
https://github.com/unlock-protocol/unlock/pull/9418 has been merged so lets close this