npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ourz/our-contracts

v1.0.6

Published

## These contracts enable **creators**, **builders**, and **collaborators of all kind** to receive royalties for their collective work, forever

Downloads

9

Readme

OURZ Split Contracts

These contracts enable creators, builders, and collaborators of all kind to receive royalties for their collective work, forever

For a less-technical overview of these contracts, take a look at the introductory Substack article


First, a quick summary of the original Split contracts by Mirror:

"Allows deployment of a minimal proxy contract that specifies a Merkle root describing an allocation across a number of different addreses. Once ETH has been deposited, incrementWindow can be called, and members of the split can claim their allocation."

While simple and effective, the original contracts don't provide any mechanism for split royalties - many ERC-721's allow for secondary sale royalties, but typically only for one address (the creator/minter)which is usually hardcoded to be the msg.sender. This fork solves that, and more.

What are these contracts?

  1. OurMinter This contract allows a Split Contract to mint NFTs, therefore enabling secondary sale royalties to be claimed by split recipients. It also provides the Split Contract an interface to the entire Zora Protocol (1/1s, Auction House, & Editions) and Mirror's Crowdfunds.
  2. OurManagement Thanks to Gnosis' Safe Contracts, this contract provides access-control to the Minting functions. This allows artists to include split recipients that they do not trust to mint on their behalf. Think of the split owners as the Whitelisted Creators. WL Creators do not necessarily have to be recipients either.
  3. OurIntrospector Another contract from Gnosis, allowing Split Contract to receive and hold ERC-721/1155 tokens.
  4. OurSplitter Is Splitter.sol from the original contracts, with the added ability to transfer recipients their allocated share of ERC-20s as well. The original contracts did not have this and any ERC-20s sent to a Split would be lost.
  5. OurStorage Is the same as SplitStorage.sol from the original contracts. Avoids storage collision in proxy contracts.
  6. OurPylon Inherits all of the above contracts and will be the central contract address for the minimal proxies' fallback function.
  7. OurFactory Allows deploying a Split contract with all of the above capabilities at minimal cost.
  8. OurProxy A minimal proxy.

How do I create a new Split contract?

  1. Find the OurFactory contract on the desired network below, or deploy the OurPylon contract, then OurFactory yourself.
  2. Call createSplit on OurFactory with the given arguments:
  • nickname_: A human-readable name for the Split.
  • splitRecipients_: A JSON stringified array of the Split Recipients containing their address, name, role in project, and allocated shares.
  • merkleRoot_: The root hash of a merkle tree consisting of the Split Recipients addresses & allocations
  • data: The encoded function data to call setup() and initialize the split with Owners.
  1. After that you will be able to use Zora just like you're used to, now through the Split Proxy. Encode the desired function data from OurPylon's ABI.

Where are the contracts deployed?

Currently the contracts are deployed on Rinkeby only:

Mainnet Factory

Mainnet Pylon)

Rinkeby Factory

Rinkeby Pylon

Benefits of these contracts

  • Splits funds securely & efficiently
  • Built for Zora. Need I say more? Supports 1/1 unique NFTs & the new Editions contracts. Read more
  • Royalties received from ERC-721 secondary sales can be split
  • Protocol Agnostic: Splits act as an extension/add-on for any NFT protocol implementing ERC-721/777/1155 standard
  • Supports minting/selling on other protocols via Gnosis Safe's execTransaction(), while still guaranteeing ETH in the split is only claimable by recipients.
  • This enables potentially endless possibilities, including using custom ManifoldXYZ creator contracts if Zora doesn't fulfill your needs.

Potential use cases for these contracts

  • Any group of creative collaborators looking to split the funds received from NFT's
  • Solo creators who wish to donate NFT sales to various charities
  • Retroactive Public Good Funding by minting NFT's representing the public good with funds going to those who put in the work

Setting up locally

Create a .env.json with your Etherscan & Alchemy API Keys, as well as a private key for an EOA with rinkeby ETH. (Metamask -> ... -> Account Details -> Export Private Key.)

yarn install

yarn tsc

yarn test


⚠️ The contracts in this repository are not audited ⚠️


Subgraph

Discord

Critiques, ideas, and any other feedback are greatly appreciated