Story Proof-of-Creativity protocol brings programmability to IP. It transforms IPs into networks that transcend mediums and platforms, unleashing global creativity and liquidity. Instead of static JPEGs that lack interactivity and composability with other assets, programmable IPs are dynamic and extensible: built to be built upon. Creators and applications can register their IP with Story, converting their static IP into programmable IP by declaring a set of on-chain rights that any program can read and write on.
📖 For detailed documentation, visit the Story docs
A piece of Intellectual Property is represented as an IP Asset and its associated IP Account, a smart contract designed to serve as the core identity for each IP. We also have various Modules to add functionality to IP Assets, like creating derivatives of them, disputing IP, and automating revenue flow between them.
When you want to bring an IP on-chain, you mint an ERC-721 NFT. This NFT represents ownership over your IP.
Then, you register the NFT in our protocol through the IP Asset Registry. This deploys an IP Account, effectively creating an "IP Asset". The address of that contract is the identifier for the IP Asset (the ipId
).
The underlying NFT can be traded/sold like any other NFT, and the new owner will own the IP Asset and all revenue associated with it.
IP Accounts are smart contracts that are tied to an IP Asset, and do two main things:
- Store the associated IP Asset's data, such as the associated licenses and royalties created from the IP
- Facilitates the utilization of this data by various modules. For example, licensing, revenue/royalty sharing, remixing, and other critical features are made possible due to the IP Account's programmability.
The address of the IP Account is the IP Asset's identifier (the ipId
).
Modules are customizable smart contracts that define and extend the functionality of IP Accounts. Modules empower developers to create functions and interactions for each IP to make IPs truly programmable.
We already have a few core modules:
- Licensing Module: create parent <-> child relationships between IPs, enabling derivatives of IPs that are restricted by the agreements in the license terms (must give attribution, share 10% revenue, etc)
- Royalty Module: automate revenue flow between IPs, abiding by the negotiated revenue sharing in license terms
- Dispute Module: facilitates the disputing and flagging of IP
- Grouping Module: allows for IPs to be grouped together
- Metadata Module: manage and view metadata for IP Assets
The various registries on our protocol function as a primary directory/storage for the global states of the protocol. Unlike IP Accounts, which manage the state of specific IPs, a registry oversees the broader states of the protocol.
The PIL is a real, off-chain legal contract that defines certain License Terms for how an IP Asset can be legally licensed. For example, how an IP Asset is commercialized, remixed, or attributed, and who is allowed to do that and under what conditions.
We have mapped these same terms on-chain so you can easily attach terms to your IP Asset for others to seamlessly and transparently license your IP.
Audit reports are available in the ./audits directory.
For access to the periphery contracts, which simplify developer workflows, please visit the protocol-periphery-v1 repository.
Story Proof-of-Creativity Core contracts are deployed natively on Story. The deployed contract addresses can be found in deployment-1315.json (Story Aeneid Testnet) and deployment-1514.json (Story Homer Mainnet).
Please install the following:
And you probably already have make
installed... but if not try looking here. and here for MacOS
yarn # this installs packages
make # this builds
forge clean
forge compile --build-info
npx @openzeppelin/upgrades-core@^1.32.3 validate out/build-info
- Edit
script/foundry/utils/upgrades/ERC7201Helper.s.sol
- Change
string constant CONTRACT_NAME = "<the contract name>";
- Run the script to generate boilerplate code for storage handling and the namespace hash:
forge script script/foundry/utils/upgrades/ERC7201Helper.s.sol
- The log output is the boilerplate code, copy and paste in your contract
make test
make coverage
Open index.html
in coverage/
folder.
Foundry comes with local network anvil baked in, and allows us to deploy to our local network for quick testing locally.
To start a local network run:
make anvil
This will spin up a local blockchain with a determined private key, so you can use the same private key each time.
We employed solhint to check code style. To check code style with solhint run:
make lint
To re-format code with prettier run:
make format
See our contribution guidelines
We welcome responsible disclosure of vulnerabilities. Please see our security policy for more information.
The license for Story Proof-of-Creativity Core is the Business Source License 1.1 (BUSL-1.1), see LICENSE.
After you have integrated our SDK and/or API with your application, in the Terms of Service for your application with your end users (which govern your end users' use of and access to your application), you must include the following sentence:
"This application is integrated with functionality provided by Story Protocol, Inc. that enables intellectual property registration and tracking. You acknowledge and agree that such functionality and your use of this application is subject to Story Protocol, Inc.'s End User Terms, which are available here: https://www.storyprotocol.xyz/end-user-terms."
We use solidity-docgen to generate the documents for smart contracts. Documents can be generated with the following command:
npx hardhat docgen
By default, the documents are generated in Markdown format in the doc
folder of the project. Each Solidity file (*.sol
) has its own Markdown (*.md
) file. To update the configuration for document generation, you can update the following section in hardhat.config.js
:
docgen: {
outputDir: "./docs",
pages: "files"
}
You can refer to the config.ts of solidity-docgen for the full list of configurable parameters.