-
Notifications
You must be signed in to change notification settings - Fork 1
onlyMember #13
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
base: main
Are you sure you want to change the base?
onlyMember #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new permission condition contract called OnlyMemberCondition that restricts permissions to members of a target contract implementing the IMembership interface.
- Adds a new permission condition contract that validates membership status
- Includes comprehensive test coverage with both unit tests and test specification
- Implements proper interface validation and error handling for invalid addresses
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/OnlyMemberCondition.sol | Main contract implementing membership-based permission condition |
| test/OnlyMemberCondition.t.sol | Unit tests covering deployment, membership validation, and interface support |
| test/OnlyMemberCondition.t.yaml | Test specification defining test cases and expected behaviors |
| test/mocks/MembershipMock.sol | Mock contract for testing membership functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/OnlyMemberCondition.sol
Outdated
| revert InvalidAddress(address(_target)); | ||
| } | ||
|
|
||
| target = _target; |
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation uses tabs mixed with spaces. This line should use consistent spacing (spaces) to match the rest of the codebase.
| target = _target; | |
| target = _target; |
| @@ -0,0 +1,83 @@ | |||
| // SPDX-License-Identifier: UNLICENSED | |||
| pragma solidity 0.8.23; | |||
Copilot
AI
Sep 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test file uses a different Solidity version (0.8.23) than the main contract and mock (^0.8.22). Consider using consistent versioning across the codebase.
| pragma solidity 0.8.23; | |
| pragma solidity ^0.8.22; |
Co-authored-by: Copilot <[email protected]> Signed-off-by: Jordan <[email protected]>
…on/conditions into feat/msig-execute-condition
No description provided.