Skip to main content

Overview

Pulend integrates with Story Protocol to register collateral as Intellectual Property (IP) assets with programmable licensing terms.

IP Registration Flow

Step 1: Mint IP Asset

User mints an ERC-721 token representing their IP on the Story Aeneid testnet.
await writeContract({
  address: ipAssetContract,
  abi: ipAssetAbi,
  functionName: "safeMint",
  args: [userAddress, metadataURI],
});

Step 2: Register on Story Protocol

The token is registered as an IP asset on Story Protocol.
import { StoryClient } from "@story-protocol/core-sdk";

const storyClient = StoryClient.newClient({
  chainId: "aeneid",
  transport: custom(walletClient.transport),
  wallet: walletClient,
});

const response = await storyClient.ipAsset.registerIpAsset({
  nft: {
    type: "minted",
    nftContract: ipAssetContract,
    tokenId: tokenId,
  },
  ipMetadata: {
    ipMetadataURI: "ipfs://...",
    nftMetadataURI: "ipfs://...",
  },
});

Step 3: Attach License Terms

PIL (Programmable IP License) terms are attached to define usage rights.
import { PILFlavor } from "@story-protocol/core-sdk";

await storyClient.license.registerPilTermsAndAttach({
  ipId: registeredIpId,
  licenseTermsData: [
    {
      terms: PILFlavor.nonCommercialSocialRemixing(),
    },
  ],
});

License Types

PIL FlavorDescription
nonCommercialSocialRemixingFree to remix, non-commercial use
commercialUseAllows commercial usage
commercialRemixCommercial use + derivatives

Network Configuration

import { aeneid } from "@story-protocol/core-sdk";

// Chain ID: 1315
// RPC: https://rpc.testnet.story.foundation

SDK Dependencies

{
  "@story-protocol/core-sdk": "^1.4.2",
  "@story-protocol/react": "0.0.1-beta.9"
}

Explorer

View registered IP assets on the Story Protocol explorer: