-
Notifications
You must be signed in to change notification settings - Fork 61
feat(test): add comprehensive tests for ERC721Enumerable and LibERC721Enumerable #221
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
Conversation
👷 Deploy request for compose-diamonds pending review.Visit the deploys page to approve it
|
feat(test): add comprehensive tests for ERC721Enumerable and LibERC72…
Coverage Report
Last updated: Tue, 25 Nov 2025 16:28:22 GMT for commit |
Gas ReportNo gas usage changes detected between All functions maintain the same gas costs. ✅ Last updated: Tue, 25 Nov 2025 16:29:03 GMT for commit |
|
@maxnorm can you review |
test: add comprehensive tests for ERC721Enumerable and LibERC721Enume…
|
@akronim26 Can you please review this? |
|
@ogazboiz Can you please run |
Fix formatting issues to pass forge fmt --check
@mudgen I've run |
Yeah sure @mudgen! @ogazboiz, please run |
|
@
yea i have done that already |
Thanks. Push the change to the pull request. |
did that yesterday @mudgen |
Okay, thanks. We still have a problem because if you look at the pull request you can see this: So maybe try it again and see if that solves the problem: Actually I found out that |
|
@ogazboiz Actually I found out that |
|
@mudgen Done! I've run |
|
@ogazboiz Okay. I suggest you update your forge version to the latest stable version, by running Your pull request is modifying the |
to this right ? because i have done foundryup but still saying nothing to commit @mudgen |
|
@ogazboiz Thanks. You can check if it is right by looking at your pull request and seeing if you are modifying any of the files in |




Summary
Implemented comprehensive test coverage for
ERC721EnumerableandLibERC721Enumerableas requested. This adds robust testing for enumeration, transfers, approvals, and mint/burn operations using Foundry.Changes Made
Checklist
Before submitting this PR, please ensure:
Code follows the Solidity feature ban - No inheritance, constructors, modifiers, public/private variables, external library functions,
using fordirectives, orselfdestruct(Applied to production code; harnesses use inheritance for testing purposes as per existing patterns).Code follows Design Principles - Readable, uses diamond storage, favors composition over inheritance
Code matches the codebase style - Consistent formatting, documentation, and patterns (e.g. ERC20Facet.sol)
Code is formatted with
forge fmtExisting tests pass - Run tests to be sure existing tests pass.
New tests are optional - Added comprehensive tests for the requested components.
All tests pass - Run
forge testand ensure everything worksDocumentation updated - N/A (Test implementation only)
Make sure to follow the contributing guidelines.
Additional Notes
Test harnesses were created following the pattern in ERC721FacetHarness.sol to expose internal functions and initialize storage for testing. All 86 new tests are passing.