Prerequisites
Creating a Project
- Run
foundryupto automatically install the latest stable version of the precompiled binaries: forge, cast, anvil, and chisel - Run the following command in a new directory:
forge init. This will create afoundry.tomland example project files in the project root. By default, forge init will also initialize a new git repository. - Initialize a new yarn project:
yarn init. (⚠️ Note: Only Yarn is compatible with the packages used in this project. Usingnpmorpnpmmay result in dependency conflicts.) - Open up your root-level
foundry.tomlfile (located in the top directory of your project) and replace it with this:
- Remove the example contract files:
rm src/Counter.sol script/Counter.s.sol test/Counter.t.sol
Installing Dependencies
Now, we are ready to start installing our dependencies. To incorporate the Story Protocol core and periphery modules, run the following to have them added to yourpackage.json. We will also install openzeppelin and erc6551 as a dependency for the contract and test.
devDependencies:

