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 Workflows and Group IPA Features #43

Merged
merged 14 commits into from
Aug 31, 2024

Conversation

sebsadface
Copy link
Member

Description

This PR initiates the process of breaking down the monolithic StoryProtocolGateway contract into smaller, specialized contracts, each responsible for a specific interaction stream with the core protocol. We refer to these contracts as "workflows." This restructuring aims to manage the growing functionalities of SPG while adhering to the size limits for a single contract.

Additionally, this PR introduces a new GroupingWorkflows contract to support Group IPA features from protocol core (see PR#192). This contract allow the following operations in a single call:

  1. Mint a token → Register as new IP → Attach PIL license terms → Add to Group IP.
  2. Register an existing token as new IP → Attach PIL license terms → Add to Group IP.
  3. Register a new Group IP → Add multiple existing IPs to the Group.

Key Changes

  • Introduced a BaseWorkflow contract to encapsulate shared variables, modifiers, and functions across different workflows.
  • Created internal library contracts for handling licensing, metadata, and permissions, which are shared between various workflows.
  • Refactored SPG to inherit from BaseWorkflow and utilize the new internal library contracts.
  • Added the GroupingWorkflows contract, inheriting from BaseWorkflow, to support Group IPA features.

Test Plan

New tests have been added to cover the Group IPA features. All new and existing tests pass locally.

Related Issues

This PR closes #35 and #42.

Note

The current deploy and upgrade script does not yet include deployment or upgrade logic for the GroupingWorkflows contract. This will be addressed in a future PR.

Copy link

@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.

Good PR. couple comments.

contracts/BaseWorkflow.sol Outdated Show resolved Hide resolved
contracts/interfaces/IGroupingWorkflows.sol Show resolved Hide resolved
yarn.lock Show resolved Hide resolved
@sebsadface sebsadface merged commit bae5bee into storyprotocol:main Aug 31, 2024
3 checks passed
@sebsadface sebsadface deleted the grouping_workflow branch September 1, 2024 21:52
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.

Add Group IPA Features to SPG
2 participants