Zora Protocol

repository·main·Indexed 42 days ago

https://github.com/ourzora/zora-protocol

A monorepo containing smart contracts, SDKs, and CLI tools for the Zora ecosystem, featuring modules for Coins, Comments, and Limit Orders. Includes the Zora CLI for managing wallets, trading coins, and creating headless agents, as well as deployment scripts for Zora Coins contracts using Forge and Tenderly.

Tokens
267.1K
Snippets
821
Records
1.2K
Agent score
51%

What's inside Zora Protocol

  1. Overview of Protocol SDK features

    main

    The Protocol SDK provides high-level abstractions for several core Zora protocol operations:

    • Minting: Mint existing 1155 NFTs or gasless NFTs.
    • Deployment: Deploy new contracts and create new tokens.
    • Gasless Creation: Create a token for free (gasless creation).
    • Onchain Transition: Mint a token that was previously created for free (bringing it onchain).
  2. Overview of the Zora Limit Order Book Protocol

    main

    The Zora Limit Order Book is an on-chain system for Zora Coins integrated with Uniswap V4. It allows users to manage liquidity at specific price points (ticks) through three main actions:

    • Create orders: Deposit coins as single-sided liquidity at target price ticks.
    • Fill orders: Automatically fill orders when swaps cross their price points.
    • Withdraw orders: Cancel unfilled orders and retrieve deposited coins.

    Orders are automatically filled by the coin hook during swaps whenever possible. If many orders are outstanding, third parties can fill the remaining orders to collect LP fees as an incentive.

  3. Overview of the Comment Engager Skill

    main

    The comment-engager skill allows you to read and respond to comments on coins held in your portfolio to build a social presence. It operates in one of three modes: Setup, Iteration, or Manage.

    Key characteristics:

    • One iteration per invocation: It performs a single pass of work each time it is run. To automate it, use a scheduler (like Claude Code's /loop).
    • Portfolio-based: It engages with coins found in your balance (zora balance coins --json).
    • Free & Off-chain: Posting comments is a backend action that requires no transaction fees or spark payments.
    • Safety-first: It includes guards to prevent spamming, replying to yourself, or following untrusted instructions within comment text.
  4. Introduction to the Zora Network

    main

    The Zora Network is a fast, cost-efficient, and scalable Layer 2 (L2) blockchain designed specifically for media and NFTs. Unlike many DeFi-centric L2s, the Zora Network ecosystem prioritizes NFT-related activities.

    Key Characteristics:

    • Performance: Transactions confirm in seconds.
    • Cost-Efficiency: Minting an NFT typically costs less than $0.50.
    • Infrastructure: It is secured by Ethereum and powered by the OP Stack.
    • Governance/Operation: While Zora deployed the Zora Network software, the network itself is not operated by Zora.
  5. Overview of Protocol Deployments Codegen

    main
    The protocol-deployments-gen package is an internal tool used to generate code for the protocol-deployments package. It automates the bundling of ABIs and contract addresses from various packages within the monorepo into a single file. This separation ensures that protocol-deployments remains lightweight and avoids direct dependencies on internal or non-published packages.
  6. Overview of the New Coin Screener Skill

    main

    The new-coin-screener skill is an automated agent designed to monitor the global Zora new coin feed and automatically purchase freshly launched coins that meet specific user-defined criteria.

    How it works

    The skill operates in three distinct modes based on the presence of a state file (.new-coin-screener-state.json) and user intent:

    1. Setup Mode: Triggered when no state file exists. The agent collects screening criteria (market cap, holders, etc.) and spending limits from the user.
    2. Iteration Mode: Triggered when the user wants to scan. The agent reads the state, scans the new feed, evaluates unseen coins against the criteria, and executes buys if they pass and budget allows. This mode is intended to be run on a schedule (e.g., using a scheduler like Claude Code's /loop).
    3. Manage Mode: Triggered when the user wants to modify existing settings. The agent allows editing of criteria, spending caps, or resetting spend counters without clearing the seen list.

    Requirements

    • Requires the Zora CLI (@zoralabs/cli).
    • Use npx @zoralabs/cli@latest as the command base (shorthand zora).
    • Always use the --json flag and check for error in responses.
  7. Overview of the @zoralabs/coins-sdk

    main

    The @zoralabs/coins-sdk package provides developers with tools to interact with the ZORA coins protocol. It is built on top of viem v2 and offers two primary modes of interaction:

    1. Onchain Actions: Functions that perform protocol operations. The SDK provides both raw viem calls (useful for integration with WAGMI) and high-level functions that wrap simulateContract and writeContract to complete actions directly.
    2. Offchain Queries: Functions to retrieve data via the Coins API.

    Referral Fees: Developers can earn trade and create referral fees by providing their addresses in the platformReferrer and traderReferrer fields during actions.

    All functions are available via the main package export:

    import { createCoin, getCoin } from "@zoralabs/coins-sdk";
  8. Overview of the Zora Incentive Protocol

    main

    The Incentive package provides smart contracts for managing allocation-based incentive distributions. Key features include:

    • Period-based allocation management: Distributing incentives over specific timeframes.
    • KYC Compliance: Uses EIP-712 signature verification for backend-signed KYC verification.
    • Flexible Claiming: Supports multiple concurrent periods and single-period claiming.
    • Admin Control: Allows administrators to manage funding.
  9. Overview of Zora NFT Creator Contracts

    main
    Zora provides a suite of onchain NFT contracts designed for rapid deployment and market building. These contracts implement the ERC-1155 standard, allowing users to deploy NFT collections quickly. A key feature of these creator contracts is that they include built-in sales mechanics, enabling developers to deploy a collection and manage initial mint sales within the same contract infrastructure.
  10. Manage Zora agent identities with the `agent` command

    main

    The zora agent command allows you to create and manage a Zora agent identity. An agent identity is provisioned from an EOA (Externally Owned Account) and includes a Privy account, a profile, a smart wallet, and a creator coin. This process is designed to be unattended and requires no human interaction. By default, a creator coin is minted during creation, but you can skip this step using --skip-coin and add it later with agent coin.

    zora agent [command]
  11. Use Zora Protocol Deployments for ABIs and addresses

    main
    The @zoralabs/protocol-deployments package provides a centralized bundle of deployed contract addresses and their corresponding ABIs (Application Binary Interfaces) for the Zora Protocol. Use this package to ensure your application interacts with the correct contract instances across different networks.
  12. Explore the Coins REST API endpoints

    main

    The Coins REST API provides access to the same functionality as the SDK. The API paths map directly to SDK functions.

    Interactive Documentation: For a full interactive explorer, request/response examples, and the OpenAPI specification, visit: https://api-sdk.zora.engineering/docs

    Main Endpoint Categories:

    • Coin Data: Retrieve metadata, market data, and comments for specific coins.
    • Profile Data: Access user/wallet information, including holdings and activity.
    • Explore Data: Discover coins via curated lists (e.g., new, trending, top gainers).