Skip to content
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

Introduce License Configurations for Group Restrictions #313

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

kingster-will
Copy link

Description

This PR introduces two new license configuration items for groups: expectMinimumGroupRewardShare and expectGroupRewardPool. These configurations allow individual IPs to define restrictions for being added to a group.

  • expectMinimumGroupRewardShare: Specifies the minimum percentage of the group’s reward share that must be allocated to the IP.
  • expectGroupRewardPool: Specifies that the IP can only be added to a group with a specific reward pool. If set to address(0), the IP cannot be added to any group.

Key Changes

  • New License Configurations: Added expectMinimumGroupRewardShare and expectGroupRewardPool to the LicensingConfig struct.
  • Validation Logic: Implemented checks to enforce the new configurations when adding IPs to groups.

Objectives

  • Restrict Group Addition: Allow IPs to define specific conditions for being added to groups.
  • Ensure Compliance: Ensure that IPs are only added to groups that meet their specified reward share and pool requirements.

Implementation Steps

  1. Update LicensingConfig Struct: Add expectMinimumGroupRewardShare and expectGroupRewardPool fields.
  2. Modify Group Addition Logic: Implement checks to enforce the new configurations when adding IPs to groups.
  3. Testing: Add tests to verify that the new configurations are correctly enforced.

Copy link
Member

@sebsadface sebsadface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@kingster-will kingster-will merged commit 6aa8573 into storyprotocol:main Nov 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants