π¦ 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 CollectionregisterIp
: Registers an IPmintAndRegisterIp
: Mints a NFT β Registers it as an IP
registerPILTermsAndAttach
: Registers PIL terms β Attaches them to an IPregisterIpAndAttachPILTerms
: Registers an IP β Registers PIL terms β Attaches them to the IPmintAndRegisterIpAndAttachPILTerms
: 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 IPmintAndRegisterIpAndMakeDerivative
: Mints a NFT β Registers it as an IP β Registers the IP as a derivative of another IPregisterIpAndMakeDerivativeWithLicenseTokens
: Registers an IP β Registers the IP as a derivative of another IP using the license tokensmintAndRegisterIpAndMakeDerivativeWithLicenseTokens
: 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 IPregisterIpAndAttachLicenseAndAddToGroup
: Registers an IP β Attaches the given license terms to the IP β Adds the IP to a group IPregisterGroupAndAttachLicense
: Registers a group IP β Attaches the given license terms to the group IPregisterGroupAndAttachLicenseAndAddIps
: 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.
Updated about 2 months ago