Conversation
…zz tests - Convert constructor test to fuzz test with variable remoteChainId - Convert safeMint test to fuzz test with variable recipient and tokenId - Convert safeMint notBridge test to fuzz test with variable caller - Convert burn test to fuzz test with variable tokenId - Convert burn notBridge test to fuzz test with variable caller - Convert tokenURI test to fuzz test with variable tokenId - Add supportsInterface test for unsupported interfaces - Add version format validation test using SemverComp.parse()
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #19094 +/- ##
===========================================
+ Coverage 73.83% 77.42% +3.59%
===========================================
Files 189 134 -55
Lines 11244 7213 -4031
===========================================
- Hits 8302 5585 -2717
+ Misses 2796 1628 -1168
+ Partials 146 0 -146
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
The contract inherits IERC721Metadata from ERC721, so it must be excluded from the unsupported interface fuzz test to prevent false failures.
maurelian
approved these changes
Feb 5, 2026
Ethnical
approved these changes
Feb 5, 2026
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
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.
Summary
Enhances the
OptimismMintableERC721test file by converting 6 existing focused tests to fuzz tests and adding 2 new tests for improved coverage.Fuzz test conversions:
remoteChainIdparametersafeMinttest now fuzzes recipient address and tokenIdsafeMintaccess control test now fuzzes caller addressburntest now fuzzes tokenIdburnaccess control test now fuzzes caller addresstokenURItest now fuzzes tokenIdNew tests added:
testFuzz_supportsInterface_unsupportedInterface_fails- verifies unsupported interfaces return falsetest_version_validFormat_succeeds- validates version string format usingSemverComp.parse()Updates since last revision
supportsInterfacefuzz test to excludeIERC721Metadatainterface ID (inherited from ERC721 base class). The contract supports 5 interfaces total, not 4.Review & Testing Checklist for Human
supportsInterfacefuzz test properly excludes all 5 supported interface IDs:IOptimismMintableERC721,IERC721Enumerable,IERC721,IERC721Metadata,IERC165safeMintfuzz test constraint_to.code.length == 0is appropriate (prevents ERC721 receiver callback issues with contract addresses)FOUNDRY_FUZZ_RUNS=10000 forge test --match-path test/L2/OptimismMintableERC721.t.sol -vNotes
All 12 tests pass locally with 10,000 fuzz runs. All CI checks pass (heavy fuzz tests included).
Link to Devin run: https://app.devin.ai/sessions/04465ffa962c420d939b99ca540fe183
Requested by: @aliersh