GithubHelp home page GithubHelp logo

ourzora / zora-721-contracts Goto Github PK

View Code? Open in Web Editor NEW
206.0 6.0 149.0 5.13 MB

Zora drops contracts (powers create.zora.co)

License: MIT License

Solidity 95.09% JavaScript 2.97% EJS 0.43% TypeScript 0.97% Shell 0.55%

zora-721-contracts's Introduction

Zora NFT Drop Media Contracts

How do I integrate these in my own site?

  1. Use wagmi/ethers/web3.js with the given artifacts (in the node package) or typechain.
  2. Use our subgraph to find media / metadata information (goerli: https://api.thegraph.com/subgraphs/name/iainnash/erc721drop-goerli) (rinkeby: https://thegraph.com/hosted-service/subgraph/iainnash/erc721droprinkeby) (mainnet: https://thegraph.com/hosted-service/subgraph/iainnash/zora-editions-mainnet)
  3. For your edition, call address(edition).purchase(quantity, {value: price * quantity}). Price and availability can be found from the subgraph or from the blockchain with the saleInfo call.
  4. Find the transfer() or sale() event from the transaction receipt to get the ID that the user minted.

Features these contracts support:

  1. ETH NFT sales
  2. Modular admin access and minting controls
  3. ERC2981 on-chain royalties
  4. Presale merkle trees
  5. On-chain modular rendering architecture
  6. ERC721A Gas savings / linear mint
  7. Limit mints per address when purchasing
  8. Allows for new features with opt-in gated user upgrades
  9. Allows for time-based open mints
  10. Includes a platform royalty fee mechanism
  11. Can admin mint NFTs to addresses and airdrop to lists of addresses

What are these contracts?

  1. ERC721Drop Each drop is a unique contract. This allows for easy royalty collection, clear ownership of the collection, and your own contract 🎉
  2. ZoraNFTCreatorV1 Gas-optimized factory contract allowing you to easily + for a low gas transaction create your own drop contract.
  3. DropMetadataRenderer A flexible metadata renderer architecture that allows for centralised and IPFS metadata group roots to be rendered.
  4. EditionsMetadataRenderer A partially on-chain renderer for editions that encodes name and description on-chain with media metadata off-chain.
  5. UpgradeGate A registry allowing for upgrades to be allowed for child contracts by zora.eth.

Flexibility and safety

All drops contracts are wholly owned by their creator and allow for extensibility with rendering and minting. The root drops contract can be upgraded to allow for product upgrades with new contracts and Zora gates allowed upgrade paths for deployed contracts to be upgraded by the users of the platform to opt into new features.

The metadata renderer abstraction allows these drops contracts to power a variety of on-chain powered projects and also.

Local development

  1. Install Foundry
  2. yarn install
  3. git submodule init && git submodule update
  4. yarn build

Bug Bounty

5 ETH for any critical bugs that could result in loss of funds. Rewards will be given for smaller bugs or ideas.

zora-721-contracts's People

Contributors

alikonuk1 avatar bjfresh avatar blokboy avatar github-actions[bot] avatar iainnash avatar isabellasmallcombe avatar jemgold avatar jgeary avatar karmacoma-eth avatar kulkarohan avatar oveddan avatar sweetmantech avatar tbtstl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

zora-721-contracts's Issues

base sepolia support

  • chainID: 84532
  • I have a PR open with deployments already. however, I just need a deployment. If zora team wants to ignore my PR and deploy their own on base sepolia I would welcome it
Screenshot 2024-03-15 at 1 14 20 PM

[Bug] Using editionSize == 0 on ERC721Drop doesn't allow minting

Deployed Contract on Goerli: https://goerli.etherscan.io/address/0xa063e18781ec993b6070446cce80ea934262b11e

Hi! We're trying to create an Editions contract with unlimited editions. The spec says

/// @param _editionSize Number of editions that can be minted in total. If 0, unlimited editions can be minted.

However, using 0 as _editionSize leads to the contract being unusable. All transactions fail. Looking at the code, I don't see any special case handling for editionSize == 0, so my suspicion is it's actually setting the total volume of the collection to 0.

Lmk if you need anymore info! Thanks for publishing these contracts!

Using Canvas feature

In the canvas feature,

I think it’s better if the word used to ‘imagine’ can be auto-used as the Title.
IMG_6601

Docs: include subgraph reference to goerli

Summary

In the README's How do I integrate these in my own site?, step 2 says:

Use our subgraph to find media / metadata information (rinkeby: https://thegraph.com/hosted-service/subgraph/iainnash/erc721droprinkeby) (mainnet: https://thegraph.com/hosted-service/subgraph/iainnash/zora-editions-mainnet)

As of September 2, 2022, https://testnet.create.zora.co/ only supports the Goerli testnet (which in turn means that the Rinkeby testnet was deprecated).

I think it would be helpful to update step 2 to replace the rinkeby information with the goerli link -- could
https://api.thegraph.com/subgraphs/name/iainnash/erc721drop-goerli be the correct one? 💭

(Originally discovered in a component in the 0xTranqui/present-materials repo)

Allow arbitrary on-chain trait data

Currently, one cannot add new properties to NFTs using the on-chain metadata renderer for create. Perhaps add an optional field to add arbitrary strings to the metadata (and can be used to override the default serial behavior).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.