Skip to content

Remove IP-Level Licensing Configuration#392

Merged
sebsadface merged 4 commits intostoryprotocol:mainfrom
sebsadface:fix/rm-set-LC-config-for-ip
Feb 4, 2025
Merged

Remove IP-Level Licensing Configuration#392
sebsadface merged 4 commits intostoryprotocol:mainfrom
sebsadface:fix/rm-set-LC-config-for-ip

Conversation

@sebsadface
Copy link
Copy Markdown
Member

Overview

This PR removes the ability to set licensing configurations at the IP level, requiring all configurations to be set at the specific license template and terms ID level.

Key Changes

LicensingModule.sol

  • Modified setLicensingConfig() to require both licenseTemplate and licenseTermsId parameters
  • Removed IP-level configuration fallback logic
  • Updated error handling to enforce non-zero license template addresses
  • Added validation to ensure licenseTermsId is non-zero when setting config

LicenseRegistry.sol

  • Removed storage and logic for IP-level configurations
  • Updated getLicensingConfig() to only return license-specific configurations
  • Modified event emissions to reflect removal of IP-level configs

Tests

  • Updated test cases to remove IP-level configuration scenarios
  • Added new test cases to verify proper validation of license template and terms ID
  • Modified group-related tests to work with license-specific configurations only

Motivation

The previous implementation allowed licensing configurations to be set at both the IP level and license-specific level, which created:

  1. Ambiguity in configuration precedence
  2. Complex inheritance rules
  3. Potential for conflicting configurations and security concerns

This change enforces a simpler, more explicit model where all configurations must be set at the license level.

Comment thread contracts/modules/licensing/LicensingModule.sol Outdated
Comment thread contracts/registries/LicenseRegistry.sol
@sebsadface sebsadface merged commit 00ab566 into storyprotocol:main Feb 4, 2025
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