Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Add Minimum Viable License Registry #3

Merged
merged 14 commits into from
Jan 19, 2024
Merged

Conversation

Ramarti
Copy link
Contributor

@Ramarti Ramarti commented Jan 19, 2024

First PR for the Licensing Module.

Licensing has been profoundly refactored from alpha from first principles, with the vision that:

  • Licensing is access control to add IP into the IP graph
  • If data structures express the licensing lifecycle well enough and future/generic functionality is properly decoupled through IParameterVerifier and a future metadata resolver, the LicenseRegistry may be enough and we don't need a LicenseModule
  • SP will support licensing Frameworks, with an array of Parameters (terms) for different moments of the licensing life cycle
  • A particular configuration (values) for Parameters in a Framework is a Policy.
  • IP nodes can define multiple policies, so children IP nodes can be added into the IP graph.
  • A License is a tradeable permission to link a child IP node with parent(s), if the conditions of a particular policy are true.
  • Adding an IP Node into the IP Graph will link the two and copy the license policy of the parent into the child.
  • IP nodes might set new policies, if they are compatible with their already assigned policies.
  • Child IP nodes might have multiple parents (licensors), and they will need their licenses to link them.
  • Licenses might have multiple licensors (future parents), expressing that under the conditions of the policy, a derivative could come from multiple parents. Meaning that an agreement between the licensors expressed in that license simplifies the process of linking, since the child doesn't need to obtain a (compatible) license per parent.

This PR focuses on minimum viable LicenseRegistry to be connected with the rest of the protocols
Out of scope for this PR:

  • Most auth and security checks
  • Actually triggering and verifying parameters
  • Interface abstraction
  • Policy and parameter compatibility checks

Copy link
Contributor

@kingster-will kingster-will left a comment

Choose a reason for hiding this comment

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

LGTM!

contracts/lib/Licensing.sol Outdated Show resolved Hide resolved
contracts/lib/Licensing.sol Outdated Show resolved Hide resolved
}
// Todo: check duplications

++_totalFrameworks;
Copy link
Contributor

Choose a reason for hiding this comment

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

Framework id start from 1, sounds right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, since Solidity doesn't have a null value, it's very useful to reserve 0 to "not set", makes the code safer IMO (easier checks)

Copy link
Contributor

@leeren leeren left a comment

Choose a reason for hiding this comment

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

lgtm

contracts/lib/Licensing.sol Show resolved Hide resolved
contracts/registries/LicenseRegistry.sol Outdated Show resolved Hide resolved
@Ramarti Ramarti merged commit b0dee98 into storyprotocol:main Jan 19, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants