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

@cobuild/splits

v0.11.7

Published

Splits empower people to earn for themselves and the community treasury, and receive votes in the process. Splits can receive ETH or ERC20 tokens, and split funds.

Downloads

9

Readme

Intro

Splits empower people to earn for themselves and the community treasury, and receive votes in the process. Splits can receive ETH or ERC20 tokens, and split funds.

Revolution splits are forked from 0xSplits contracts @ https://github.com/0xSplits/splits-contracts. They enable community members to split onchain revenue with the DAO treasury and any other relevant people or accounts.

Each revolution split sends an amount of ether to the DAO treasury, routed via the PointsEmitter.

Each split specifies a list of recipients who receive ether, and a list of recipients who receive points which are purchased when the Split distributes money earned to the treasury via the PointsEmitter contract's buyToken call.

Lifecycle of a split

A user who wants to earn money for the treasury and themselves creates a split via createSplit

The split address can be used in any protocol or website where an address is provided, and can receive any ETH or ERC20 tokens.

ETH or ERC20s pile up in the splits contract.

distributeEth is called which withdraws ETH and ERC20s from the split contract into the SplitMain contract. Based on the accounts and percent allocations of the split, funds are distributed to all account balances in the SplitMain contract.

Users are then able to call withdraw on the SplitMain contract to receive their balances of ether, ERC20, and points.

Creating a split

Call createSplit on the SplitMain contract.

Specify a list of accounts to split funds between, and percentAllocations which dictate the proportion of funds split.

Specify the pointsData which contains a percentage dictating the amount of ether that is reserved for the treasury, and a list of accounts and percentAllocations to split the points purchased with.

Distributing a split

Call distributeEth on the SplitMain contract to initiate a withdrawal from the Split contract into the main split manager.

In this call, accounts ethBalances and ethPointsBalances are updated per the percentages and accounts specified on the split.

The ETH held in ethPointsBalances when withdrew is used to purchase the account points, at the time of withdrawal, via the PointsEmitter contract.

Withdrawing

Call withdraw on SplitMain to withdraw funds from a split to a given account

Coming soon

An auto-updating liquid split that changes pointsData percentAllocations and accounts based on who sends money to the split. Imagine giving all Zora collectors on a mint points based on how much they collected.