Skip to content

Introduce License Configurations for Group Restrictions#313

Merged
kingster-will merged 4 commits intostoryprotocol:mainfrom
kingster-will:fix/trust-issue-7-1
Nov 21, 2024
Merged

Introduce License Configurations for Group Restrictions#313
kingster-will merged 4 commits intostoryprotocol:mainfrom
kingster-will:fix/trust-issue-7-1

Conversation

@kingster-will
Copy link
Copy Markdown
Collaborator

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.

Comment thread contracts/registries/LicenseRegistry.sol Outdated
Copy link
Copy Markdown
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
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