This PR refactors the monolithic StoryProtocolGateway into three "workflow" contracts. The associated tests, deployment, and upgrade scripts have been updated accordingly. Following this change, the Story PoC Periphery now includes the following five main contracts:
RegistrationWorkflows (new)
LicenseAttachmentWorkflows (new)
DerivativeWorkflows (new)
GroupingWorkflows (existing)
SPGNFT (existing)
Key Changes
Split StoryProtocolGateway.sol into three separate contracts: RegistrationWorkflows.sol, LicenseAttachmentWorkflows.sol, and DerivativeWorkflows.sol. Their interfaces were also separated accordingly.
Added WorkflowStructs to contain shared struct definitions across the different workflows.
Updated DeployHelper to support the deployment of the new workflow contracts.
Moved mock core protocol deployment logic from BaseTest to DeployHelper.
Added Users utility library to setup mock users and secret keys for tests.
Refactored SPG tests into three separate test files corresponding to the new workflow contracts.
Created UpgradeHelper to house shared logic for upgrading workflow contracts.
Added upgrade scripts for the new workflow contracts and updated the existing upgrade scripts.
Updated documentation to reflect these changes.
Test Plan
All new and existing tests pass locally.
Related Issue
This PR closes #42
Notes
This PR introduces significant changes to the contract interfaces, which will require updates to existing integrations.
Description
This PR refactors the monolithic
StoryProtocolGateway
into three "workflow" contracts. The associated tests, deployment, and upgrade scripts have been updated accordingly. Following this change, the Story PoC Periphery now includes the following five main contracts:RegistrationWorkflows
(new)LicenseAttachmentWorkflows
(new)DerivativeWorkflows
(new)GroupingWorkflows
(existing)SPGNFT
(existing)Key Changes
StoryProtocolGateway.sol
into three separate contracts:RegistrationWorkflows.sol
,LicenseAttachmentWorkflows.sol
, andDerivativeWorkflows.sol
. Their interfaces were also separated accordingly.WorkflowStructs
to contain shared struct definitions across the different workflows.DeployHelper
to support the deployment of the new workflow contracts.BaseTest
toDeployHelper
.Users
utility library to setup mock users and secret keys for tests.UpgradeHelper
to house shared logic for upgrading workflow contracts.Test Plan
All new and existing tests pass locally.
Related Issue
Notes
This PR introduces significant changes to the contract interfaces, which will require updates to existing integrations.