Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a comprehensive suite of unit tests with accompanying mock contracts and helper libraries, and updates facet implementations to support virtual selector overrides and enhanced configuration validation.
- Adds mock contracts (
VerifRegApiMock,DataCapApiMock,ActorMock,StorageMock,ConstantMock) and CBOR test libraries for serialization tests. - Implements a broad range of Solidity unit tests covering facets, diamond initialization, allocation logic, and configuration edge cases.
- Updates facet code to mark
selectors()methods asvirtualand refines thesetDataCapTermMaxDaysvalidation logic.
Reviewed Changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/mocks/VerifRegApiMock.sol | Added mock fallback logic; note duplicate import of StorageMock. |
| test/mocks/StorageMock.sol | Implements persistent storage for mocks; minor typo in comments. |
| src/facets/OwnerFacet.sol | Adjusted data cap term maximum validation; potential unit mismatch. |
| test/AllocateFacet.t.sol | Added allocation scenario tests; contract name vs. filename mismatch. |
| .env.example | Updated example config comments for collateral and replica settings. |
Comments suppressed due to low confidence (1)
test/AllocateFacet.t.sol:10
- [nitpick] The contract is named
AllocatorFacetTestbut the file isAllocateFacet.t.sol. Consider aligning the contract name and filename (e.g.,AllocateFacetTest) for clarity.
contract AllocatorFacetTest is Test, AllocateHelper {
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.
No description provided.