πŸ“¦ SPG

The Story Protocol Gateway (SPG) is a group of periphery/utility smart contracts, deployed on our protocol that allows you to combine independent operations - like registering an 🧩 IP Asset and attaching License Terms to that IP Asset - into one transaction to make your life easier.

πŸ—’οΈ

Contracts

View the smart contracts here.

For example, this mintAndRegisterIpAndAttachPILTerms is one of the functions in the SPG (more specifically in the "License Attachment Workflows") that allows you to mint an NFT, register it as an IP Asset, and attach License Terms to it all in one call:

function mintAndRegisterIpAndAttachPILTerms(
  address nftContract,
  address recipient,
  IPMetadata calldata ipMetadata,
  PILTerms calldata terms
) external onlyCallerWithMinterRole(nftContract) returns (address ipId, uint256 tokenId, uint256 licenseTermsId)

Supported Workflows

As mentioned above, there are many different functions we have created for you that combine multiple functions into one. Because we have created many of them, we have categorized them into different groups. These groups are called "workflows".

πŸ“˜

Below Workflow Docs

The below docs on the supported workflows is a copy + paste of this document. While we will try to keep the below list up to date, you can always go there for the latest version.

  • createCollection: Creates a SPGNFT Collection
  • registerIp: Registers an IP
  • mintAndRegisterIp: Mints a NFT β†’ Registers it as an IP

  • registerPILTermsAndAttach: Registers PIL terms β†’ Attaches them to an IP
  • registerIpAndAttachPILTerms: Registers an IP β†’ Registers PIL terms β†’ Attaches them to the IP
  • mintAndRegisterIpAndAttachPILTerms: Mints a NFT β†’ Registers it as an IP β†’ Registers PIL terms β†’ Attaches them to the IP

  • registerIpAndMakeDerivative: Registers an IP β†’ Registers it as a derivative of another IP
  • mintAndRegisterIpAndMakeDerivative: Mints a NFT β†’ Registers it as an IP β†’ Registers the IP as a derivative of another IP
  • registerIpAndMakeDerivativeWithLicenseTokens: Registers an IP β†’ Registers the IP as a derivative of another IP using the license tokens
  • mintAndRegisterIpAndMakeDerivativeWithLicenseTokens: Mints a NFT β†’ Registers it as an IP β†’ Registers the IP as a derivative of another IP using the license tokens

  • mintAndRegisterIpAndAttachLicenseAndAddToGroup: Mints a NFT β†’ Registers it as an IP β†’ Attaches the given license terms to the IP β†’ Adds the IP to a group IP
  • registerIpAndAttachLicenseAndAddToGroup: Registers an IP β†’ Attaches the given license terms to the IP β†’ Adds the IP to a group IP
  • registerGroupAndAttachLicense: Registers a group IP β†’ Attaches the given license terms to the group IP
  • registerGroupAndAttachLicenseAndAddIps: Registers a group IP β†’ Attaches the given license terms to the group IP β†’ Adds existing IPs to the group IP

  • transferToVaultAndSnapshotAndClaimByTokenBatch: Transfers revenue tokens to ancestor IP’s royalty vault β†’ Takes a snapshot of the royalty vault β†’ Claims all available revenue tokens from the snapshot to the claimer’s wallet
    • Use Case: For IP royalty token holders who want to claim both their direct revenue and royalties from descendant IPs.
  • transferToVaultAndSnapshotAndClaimBySnapshotBatch: Transfers revenue tokens to ancestor IP’s royalty vault β†’ Takes a snapshot of the royalty vault β†’ Claims all available revenue tokens from the new snapshot to the claimer’s wallet β†’ Claims all available revenue tokens from each provided unclaimed snapshot to the claimer’s wallet
    • Use Case: For IP royalty token holders who want to claim both direct revenue and descendant royalties from the latest snapshot and previously taken snapshots.
  • snapshotAndClaimByTokenBatch: Takes a snapshot of the royalty vault β†’ Claims all available revenue tokens from the new snapshot to the claimer’s wallet
    • Use Case: For IP royalty token holders who want to claim the current revenue in their IP’s royalty vault (which may or may not include descendant royalties).
  • snapshotAndClaimBySnapshotBatch: Takes a snapshot of the royalty vault β†’ Claims all available revenue tokens from the new snapshot to the claimer’s wallet β†’ Claims all available revenue tokens from each provided unclaimed snapshot to the claimer’s wallet
    • Use Case: For IP royalty token holders who want to claim the current revenue in their IP’s royalty vault from the latest snapshot and previously taken snapshots.

Batching Calls

Although the SPG contains certain functions like mintAndRegisterIpAndAttachPILTerms, registerIpAndAttachPILTerms, and a bunch more, it would be tedious for us to continually update the contract to account for every single combination of possible interactions with an IP Asset.

Instead, we have allowed for a "Multicall" mechanism where you can batch transactions how you like. For more info, see Batch Function Calls.