Smart Contract Tutorial
Completed Code
Skip the tutorial and view the completed code. Follow the README instructions
to run the tests, or go to the
/test
folder to view all of the example
contracts.Our Smart Contracts
As of the current version, our Proof-of-Creativity Protocol is compatible with all EVM chains and is written as a set of Smart Contracts in Solidity. There are two repositories that you may interact with as a developer:- Story Protocol Core - This repository contains the core protocol logic, consisting of a thin IP registry (the IP Asset Registry), a set of Modules defining logic around Licensing, Royalty, Dispute, metadata, and a module manager for administering module and user access control.
- Story Protocol Periphery- Whereas the core contracts deal with the underlying protocol logic, the periphery contracts deal with protocol extensions that greatly increase UX and simplify IPA management. This is mostly handled through the SPG.
Deploy & Verify Contracts on Story
The approach to deploy & verify contracts comes from the Blockscout official
documentation.
Do not use RANDAO for pseudo-randomness, instead use onchain VRF (Pyth or Gelato). Currently, RANDAO value is set as the parent block hash and thus is not random for X-1 block.