This repository is a monorepo for the Zora Protocol
In it you will find:
Install prerequisites:
Install dependencies:
yarn
Build contracts:
yarn build
Run tests:
yarn test
Run in development mode (watch tests):
yarn dev
5 ETH for any critical bugs that could result in loss of funds. Rewards will be given for smaller bugs or ideas.
See DEVELOPMENT.md
Our contracts import dependencies via npm/node_modules, so if using forge install
, additional steps are required to install contract dependencies using yarn and setup their mappings:
-
Make sure to have yarn installed yarn
-
Install contracts with forge:
forge install ourzora/zora-protocol@main
-
Install npm dependencies for zora protocol contracts:
cd lib/zora-protocol && yarn
-
Add the following remappings to your project:
ourzora/1155-contracts/src/=lib/zora-protocol/packages/1155-contracts/src/
_imagine=lib/zora-protocol/packages/1155-contracts/_imagine/
ds-test/=lib/zora-protocol/node_modules/ds-test/src/
forge-std/=lib/zora-protocol/node_modules/forge-std/src/
@zoralabs/openzeppelin-contracts-upgradeable/=lib/zora-protocol/node_modules/@zoralabs/openzeppelin-contracts-upgradeable/
@zoralabs/protocol-rewards/src/=lib/zora-protocol/node_modules/@zoralabs/protocol-rewards/src/
@openzeppelin/contracts/=lib/zora-protocol/node_modules/@openzeppelin/contracts/
solemate/=lib/zora-protocol/node_modules/solemate/src/
solady/=lib/zora-protocol/node_modules/solady/src/
Now in your solidity code, you should be able to import contracts like so:
import { ZoraCreator1155Impl } from "ourzora/1155-contracts/src/nft/ZoraCreator1155Impl.sol";