@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
15
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?
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.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.OurIntrospector
Another contract from Gnosis, allowing Split Contract to receive and hold ERC-721/1155 tokens.OurSplitter
IsSplitter.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.OurStorage
Is the same asSplitStorage.sol
from the original contracts. Avoids storage collision in proxy contracts.OurPylon
Inherits all of the above contracts and will be the central contract address for the minimal proxies' fallback function.OurFactory
Allows deploying a Split contract with all of the above capabilities at minimal cost.OurProxy
A minimal proxy.
How do I create a new Split contract?
- Find the
OurFactory
contract on the desired network below, or deploy theOurPylon
contract, thenOurFactory
yourself. - Call
createSplit
onOurFactory
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.
- 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:
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