-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Add Math.modExp and a Panic library
#3298
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
Amxx
merged 60 commits into
OpenZeppelin:master
from
mw2000:modular-exponentiation-precompile-wrapper-#1985
Feb 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
91e39eb
Added Wrapper Library for ModularExponentiation along with tests.
mw2000 712a0f3
Fixed linting issues.
mw2000 77f33ea
Added function to Math.sol and migrated tests.
mw2000 4683f26
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 7489ce4
Merge remote-tracking branch 'origin/master' into modular-exponentiat…
mw2000 d576641
Added tests
mw2000 0d78d29
Fixed lint
mw2000 5d99ed8
Added changeset
mw2000 acb16f2
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 d7e81cf
Fixed codespell error
mw2000 85187dd
Fixed function calling in tests
mw2000 d458765
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 01badeb
Update contracts/utils/math/Math.sol
Amxx a1c1439
Added a restriction to e
mw2000 d81d69d
Merge branch 'modular-exponentiation-precompile-wrapper-#1985' of htt…
mw2000 6e8cced
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 fd7b8de
All args should be non-zero
mw2000 26a036e
Seperating the e and m != 0 out
mw2000 4ba0a29
Fixed test when m = 1
mw2000 988c950
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 c08ac50
Added last bracket.
mw2000 98f7994
Fixed lint issues
mw2000 f634aab
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
mw2000 66a0c1f
Added custom errors + tests for it
mw2000 eecd818
Added comments for errors
mw2000 1583160
Added a not to be reverted for custom error
mw2000 19ead8e
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
Amxx 8cf355f
better fuzzing for modexp
Amxx 113e85e
cleanup tests
Amxx 4e1cf0d
Update .changeset/shiny-poets-whisper.md
Amxx 6d7c154
return 0 instead of reverting in case of error
Amxx 84b285d
fallback to revert
Amxx 9e73f46
simplification
Amxx 76c9afa
cleanup
Amxx 1ff0776
Refactor fuzz test
ernestognw f84b1b6
Lint
ernestognw fe32a38
mulDiv fuzzing with no external
Amxx 4accc2e
modExp in assembly to avoid memory leaks
Amxx cfd80e9
optimise and mark as memory-safe
Amxx 526d6b9
add note about using Ferma's little theorem to compute inverse in big…
Amxx 3718090
Add utils/Panic.sol library
Amxx cd2f2e9
add missing files
Amxx 104002e
fix lint
Amxx d149ea6
mark constants as internal
Amxx 05aa60e
slither disable
Amxx f352681
add unit testing for Panic
Amxx 32ea4bb
Update test/utils/Panic.test.js
Amxx 2e962c8
fix lint
Amxx 275c959
Update Panic.sol
Amxx 24cd52a
Implement tryMod
ernestognw 50374a1
Implement review suggestions
ernestognw ee91836
fix tryModExp behavior and test
Amxx d13e52d
better vm.expectRevert check
Amxx 969e259
use stdErrors for forge-std
Amxx e64c3f9
remove unecessary import
Amxx 06220be
add a mock to force import libraries
Amxx 9137bae
rename panic codes following libsolutil
Amxx 81e8ba0
fix lint
Amxx 2b72050
Merge branch 'master' into modular-exponentiation-precompile-wrapper-…
Amxx 2fc20d4
Nits
ernestognw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed lint
- Loading branch information
commit 0d78d29e3e6e21101b408118da2bee15c85e8dbd
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.