-
Notifications
You must be signed in to change notification settings - Fork 0
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
style: use custom errors instead #56
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zlace0x
reviewed
Dec 11, 2022
zlace0x
reviewed
Dec 11, 2022
zlace0x
reviewed
Dec 11, 2022
zlace0x
reviewed
Dec 11, 2022
zlace0x
reviewed
Dec 11, 2022
zlace0x
reviewed
Dec 11, 2022
Pushed another commit that addresses most of the comments. And also compared the gas usage. Before PR:
After custom errors:
Generally we saved 20-80 gas for functions where there is an error thrown. |
zlace0x
reviewed
Dec 12, 2022
Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com>
zlace0x
approved these changes
Dec 12, 2022
zlace0x
added a commit
that referenced
this pull request
Dec 12, 2022
* style: grouped functions * forge install: openzeppelin-contracts * chore: updates to lib * chore: natspec comments for contracts * chore: closes #39 and #40 * chore: removed unused solmate * refactor: moved saturatingAdd to mathUtil * chore: cleanup * Apply suggestions from code review Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * fix: resolve some comments * doc: generated docs under doc/ * chore: cleanups on comments * style: use custom errors instead (#56) * style: use custom errors instead * fix: structured files for custom errors * style: change INITIAL values to upper-case * Update src/Funnel.sol Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * chore: fix comments slashes * fix: apply linter version changes Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <zlace0x@gmail.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com>
zlace0x
added a commit
that referenced
this pull request
Dec 12, 2022
* fix: addresses #32, allowance() amount should reflect transferable amounts for transferFrom() and transfer() * fix: comment contradition #43 * wip: added overflow test cases according to #30, identified area of overflow * fix: potential fix for #30 * refactor: adhere to checks-effects-interaction pattern #35 * fix: make allowance() external #45 * fix: dropped virtual from permit, permitRenewable #44 * refactor: added require reason * chore: added gas reports * fix: solidity compiler for deploy script * Chore/natspec (#53) * style: grouped functions * forge install: openzeppelin-contracts * chore: updates to lib * chore: natspec comments for contracts * chore: closes #39 and #40 * chore: removed unused solmate * refactor: moved saturatingAdd to mathUtil * chore: cleanup * Apply suggestions from code review Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * fix: resolve some comments * doc: generated docs under doc/ * chore: cleanups on comments * style: use custom errors instead (#56) * style: use custom errors instead * fix: structured files for custom errors * style: change INITIAL values to upper-case * Update src/Funnel.sol Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * chore: fix comments slashes * fix: apply linter version changes Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <zlace0x@gmail.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0xyz@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com>
zlace0x
added a commit
that referenced
this pull request
Dec 12, 2022
* fix: resolves #48 resolves 45 resolves #44 resolves #41 resolves #38 * fix: closes #34 * fix: zero address validation and make functions external. Closes #42 closes #45 * fixed pragma. closes #36 * fix as 0.8.17 * fix: remove solmate * refactor: PR comments - reorder imports, fix qoutes - removed virtual for _checkOn* functions - added virtual to supportsInterface - fix compiler version to 0.8.17 * fix: addresses #32, allowance() amount should reflect transferable amounts for transferFrom() and transfer() * fix: comment contradition #43 * wip: added overflow test cases according to #30, identified area of overflow * fix: potential fix for #30 * refactor: adhere to checks-effects-interaction pattern #35 * fix: make allowance() external #45 * fix: dropped virtual from permit, permitRenewable #44 * refactor: added require reason * chore: added gas reports * fix: solidity compiler for deploy script * Chore/natspec (#53) * style: grouped functions * forge install: openzeppelin-contracts * chore: updates to lib * chore: natspec comments for contracts * chore: closes #39 and #40 * chore: removed unused solmate * refactor: moved saturatingAdd to mathUtil * chore: cleanup * Apply suggestions from code review Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * fix: resolve some comments * doc: generated docs under doc/ * chore: cleanups on comments * style: use custom errors instead (#56) * style: use custom errors instead * fix: structured files for custom errors * style: change INITIAL values to upper-case * Update src/Funnel.sol Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> * chore: fix comments slashes * fix: apply linter version changes Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: zlace0x <zlace0x@gmail.com> Co-authored-by: zlace0x <81418809+zlace0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0x@users.noreply.github.com> Co-authored-by: Edison <6057323+edison0xyz@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.