-
Notifications
You must be signed in to change notification settings - Fork 12k
Replace revert strings with custom errors #4261
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
ernestognw
merged 122 commits into
OpenZeppelin:master
from
ernestognw:lib-839-custom-errors
Jun 12, 2023
Merged
Changes from all commits
Commits
Show all changes
122 commits
Select commit
Hold shift + click to select a range
4307e5b
Replace error strings with custom errors
ernestognw ddf387c
Lint
ernestognw 0800e32
Finish original list of errors
ernestognw 199093b
Finish missing require statements
ernestognw d3703bd
Self review
ernestognw 11931ca
Finish revert statements
ernestognw bb3a12f
Applied spreadsheet suggestion
ernestognw 9f58996
Refactor Address.sol
ernestognw a76e4b6
Finish custom errors replacement
ernestognw c65b76b
Fix SignatureChecker
ernestognw f58c06b
Add account to `GovernorAlreadyCastVote` error
ernestognw 810468d
Finish access, finance, and governance testing
ernestognw adbe841
Fix proxy tests
ernestognw c29e041
First round of reviews
ernestognw bc00094
Fix tests for ERC20 and ERC1155 tokens
ernestognw faf33a4
Lint
ernestognw cdbea1e
Bump Pragma to 0.8.19
ernestognw 77eee99
Finish token tests
ernestognw ba42df6
Fix ERC20Capped
ernestognw c31e10d
Fix Address tests
ernestognw b3b7e08
Advancements on utils
ernestognw 960066b
Fix utils test
ernestognw b815a4f
Remove unnecessary test file
ernestognw 99347e4
Fix conflicts with master
ernestognw d7d3f90
Lint
ernestognw 5bc0812
Add changeset
ernestognw 3276d35
Fix generation script
ernestognw 23a7be2
Fix flaky Create2 test
ernestognw 3f4f84a
Update comment in Ownable
ernestognw 3dc21e2
Add `Unset` state to TimelockController
ernestognw 1c119f7
Replace `GovernorMissingETA` with `GovernorProposalNotQueued`
ernestognw 6541481
Revert interface changes to MinimalForwarder
ernestognw 9c71d9c
Remove ERC-6093 from token interfaces
ernestognw 5f8417b
Replace `msg.sender` with `_msgSender()` in ERC721Wrapper
ernestognw 55f0eef
Make `onRevert` view visilibity
ernestognw 5fe9511
Change Ownable2Step's error for invalid ownership acceptance
ernestognw c927bc3
Replace SafeERC20's domain
ernestognw 0a5bb3f
Merge branch 'next-v5.0' into lib-839-custom-errors
ernestognw eac424e
Lint fix
ernestognw e11f4fa
Merge branch 'next-v5.0' into lib-839-custom-errors
ernestognw 5dc5ada
Fix checkpoint tests
ernestognw 44535a2
Enabled all tests
ernestognw 0d1d6c0
Remove GovernorDuplicatedProposal error
ernestognw 07d4fc9
Merge branch 'next-v5.0' into lib-839-custom-errors
ernestognw 058b672
Lint
ernestognw 1d63212
Update contracts/governance/IGovernor.sol
ernestognw 276331c
Update contracts/utils/Address.sol
ernestognw 28e2e16
Round of review
ernestognw 2b0ce34
Merge branch 'next-v5.0' into lib-839-custom-errors
ernestognw 4946dd9
Rename AccessContol renounce error and parameter
ernestognw 3173d53
Rename `Unsuccessful` -> `Failed`
ernestognw 6c8d0e1
Merge Address failed call errors
ernestognw cb79ab3
Rename *FailedLowLevelCall to *FailedCall
ernestognw be68001
Round of review
ernestognw f02af6e
Change token paused errors
ernestognw 2d735e6
Fix tests
ernestognw 2ecfd14
Round of review
ernestognw b3af988
Round of review
ernestognw c862ca5
More review
ernestognw 5069bdf
Fixed example in StorageSlot.sol
ernestognw 48fe940
Changed Checkpoint error
ernestognw c15fbf8
Added value to StringsInsufficientHexLength
ernestognw a10ee8b
Added `useCheckedNonce` for Nonces
ernestognw 8d62e91
Merge branch 'master' into lib-839-custom-errors
ernestognw 861d341
Replace ERC20DecreasedAllowance for SafeERC20
ernestognw 61a6026
Merge branch 'master' into lib-839-custom-errors
ernestognw c796d15
Improved MinimalForwarder errors
ernestognw 6a9c40f
Merge branch 'master' into lib-839-custom-errors
ernestognw a4063c9
Review
ernestognw 5876d1c
Remove mutable variables in ERC1155 tests
ernestognw 6d8c498
Remove unnecessary error
ernestognw 219923b
Rename `Inexistent` to `Nonexistent`
ernestognw 1fa5acc
Rename AccessControlDefaultAdminRules errors
ernestognw 602df5a
Overflown -> Overflowed
ernestognw 4a14bec
Simplified SafeCast errors
ernestognw ff12505
Review round
ernestognw 65ad2e5
Lint
ernestognw 91bdb7c
Mooar review
ernestognw a33a4c8
Revert ERC721 changes
ernestognw 2253c40
Rename Paused errors by using a library
ernestognw 892dbcc
Lint
ernestognw 028f383
Fix tests
ernestognw 9c70af8
Review suggestions
ernestognw 7647774
Move Pausable errors to its own file
ernestognw 45ce67f
Merge branch 'master' into lib-839-custom-errors
ernestognw 11092da
Moar suggestions
ernestognw 6009844
Moar suggestions
ernestognw 55433e7
Improved custom error matcher
ernestognw 4dac3c7
Lint
ernestognw aa44323
Merge branch 'master' into lib-839-custom-errors
ernestognw cb4594f
Merge branch 'master' into lib-839-custom-errors
ernestognw 6df52b0
Simplify custom error matcher regex
ernestognw ce83461
Attempt to remove the optimizations branch check for custom errors
ernestognw e5475a2
Simplify custom error matcher
ernestognw 03f1152
Revert ERC1155Supply _update order
ernestognw 7e320a7
Merge branch 'master' into lib-839-custom-errors
ernestognw 0e158b5
Update GUIDELINES.md
ernestognw f1717a6
Use verifyCallResult in Timelock
ernestognw db4bcf9
Fix TimelockController tests
ernestognw e0949a3
Add domain to DoubleEndedQueue errors
ernestognw 46904d7
Suggestions
ernestognw 3a74c47
Change Pausable error names
ernestognw 7bf1afc
Remove address context from UUPSUnauthorizedCallContext
ernestognw 13dd54a
More suggestions
ernestognw c97d95c
Remove errorPrefix in AccessControl tests
Amxx fc1e4b0
Remove errorPrefix in ERC20 tests
Amxx 27b15e3
move ERC20Permit.test.js out of draft
Amxx 2ad6e65
Remove errorPrefix in ERC721 tests
Amxx 9304b9b
Fix test
ernestognw d4f7071
Remove Pausable.errors.sol library
ernestognw 88cf256
Applied suggestions
ernestognw 4432ee6
More suggestions
ernestognw b2aaf9e
Remove _custom revert functions
ernestognw d5815a8
Fix tests
ernestognw d4e27a0
increase gas for test
frangio 73ac6dd
document unspecified revert, and add custom error check
Amxx 8994817
document bubbling of panic code
Amxx c1c6a75
Update contracts/utils/Address.sol
ernestognw 3da76b0
Update test/helpers/customError.js
ernestognw 4aa35c8
Remove `bitsize` from SafeCastOverflowed cast errors
ernestognw 007d6b0
Lint
ernestognw 1cd28fe
Merge branch 'master' into lib-839-custom-errors
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'openzeppelin-solidity': major | ||
--- | ||
|
||
Replace revert strings and require statements with custom errors. |
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
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
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
Oops, something went wrong.
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.