A Case Study showing how PiPi, a generative pfp project, registers derivatives of Story’s official Ippy mascot.
In the bottom right, you can see Ippy is the root IP of this PiPi.
_mintNFT
function in the PiPi.sol
contract:
whitelistMint
which then calls _mintNFT
after checking if the user is on a whitelist. On line 16, we are then minting a new NFT to the contract.
_registerAsIPAsset
function:
register
function on the IP Asset Registry, which creates a new IP Asset in our protocol, and returns an ipId
.
CoreMetadataModule.sol
. As described here, we need to set 4 params:
nftMetadataHash
nftMetadataURI
ipMetadataHash
ipMetadataURI
PiPi.sol
contract uses registerDerivativeForToken
to handle this:
registerDerivative
in the Licensing Module, with:
ipId
: the new ipId
we got in step 3parentIpIds
: an array that contains Ippy’s ipId
, which is 0xB1D831271A68Db5c18c8F0B69327446f7C8D0A42
licenseTermsIds
: an array containing 1
, which is the license term ID of Non-Commercial Social Remixing (NCSR). This means the derivative can use Ippy for free but not commercialize itlicenseTemplate
: the address of PILicenseTemplate
, found in Deployed Smart ContractsroyaltyContext
: just set to zero addressmaxMintingFee
, maxRts
, and maxRevenueShare
can be set to 0. They don’t do anything because the license terms are non-commercial.