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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@curator-studio/contracts

v1.0.0

Published

Smart contracts for the Curator platform: strategy-based token distribution on Ethereum with 0xSplits integration.

Readme

Curator Contracts

Smart contracts for the Curator platform: strategy-based token distribution on Ethereum with 0xSplits integration.

Architecture

  • Strategy – Core contract for weighted token distribution; deployed as minimal proxies (clones) via the factory.
  • StrategyFactory – Deploys new Strategy instances and holds the implementation. Uses the official SplitsWarehouse.
  • SplitsWarehouse – 0xSplits integration for unified withdrawals (use existing deployment on testnet/mainnet).
  • ForeverSubnameRegistrar – ENS subdomain registration (e.g. strategy.dacc.eth).
  • TestToken – ERC20 test tokens for local development only.

Deployment Overview

Deployment is split into two phases:

  1. Shared infrastructure — deploys Strategy implementation, SplitsWarehouse, and (on hardhat) local ENS.
  2. Per-tenant deployment — deploys a tenant-specific StrategyFactory with its own ENS domain.

| Network | Shared infra | Per-tenant | |---------|-------------|------------| | Local | bun run deploy | bun run deploy:tenant -- --tenant <name>.eth | | Sepolia | bun run deploy:sepolia | bun run deploy:tenant -- --tenant <name>.eth --network sepolia | | Base Sepolia | bun run deploy:base-sepolia | bun run deploy:tenant -- --tenant <name>.eth --network base-sepolia | | Mainnet | bun run deploy:mainnet | bun run deploy:tenant -- --tenant <name>.eth --network mainnet |

Shared infrastructure addresses

  • SplitsWarehouse: 0x8fb66F38cF86A3d5e8768f8F1754A24A6c661Fb8 (Sepolia, Base Sepolia & mainnet)
  • ENS (Sepolia): NameWrapper 0x0635513f179D50A207757E05759CbD106d7dFcE8, Resolver 0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5
  • ENS (Mainnet): NameWrapper 0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401, Resolver 0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63
  • L2 Reverse Registrar (Base Sepolia): 0x00000BeEF055f7934784D6d81b6BC86665630dbA

Prerequisites

Copy .env.example to .env and fill in the values for the target network:

SEPOLIA_RPC_URL=
SEPOLIA_PRIVATE_KEY=

BASE_SEPOLIA_RPC_URL=
BASE_PRIVATE_KEY=

ETHERSCAN_API_KEY=
BASESCAN_API_KEY=

Local Development

# Terminal 1: start Hardhat node
bun run dev

# Terminal 2: deploy shared infrastructure
bun run deploy

# Terminal 3: deploy a tenant
bun run deploy:tenant -- --tenant dacc.eth

bun run deploy deploys full shared infrastructure including local ENS, SplitsWarehouse, Strategy, and test tokens. The ENS domain configured in ENS.dev.ts is registered automatically.

deploy:tenant deploys a tenant-specific StrategyFactory and configures ENS for it. On hardhat, it automatically registers the parent ENS name if it doesn't already exist.

Tests

bun run test

Testnet (Sepolia / Base Sepolia)

ENS Prerequisites

  1. Own your domain (e.g. dacc.eth) on the target network
  2. Wrap it in the NameWrapper — required so ForeverSubnameRegistrar can create subnames via setSubnodeRecord

The easiest way is to open scripts/wrap-ens-domain.html in a browser — it connects MetaMask, detects the network, and walks through approve + wrap with the correct fuse.

Alternatively, with cast:

# Calculate token ID for your label
bun -e "import { id } from 'ethers'; console.log(id('your-label'))"

# 1. Approve NameWrapper to take the domain from BaseRegistrar
cast send 0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85 \
  "approve(address,uint256)" \
  0x0635513f179D50A207757E05759CbD106d7dFcE8 \
  <TOKEN_ID> \
  --private-key $SEPOLIA_PRIVATE_KEY --rpc-url $SEPOLIA_RPC_URL

# 2. Wrap the name with CANNOT_UNWRAP fuse (1) — required for ForeverSubnameRegistrar
cast send 0x0635513f179D50A207757E05759CbD106d7dFcE8 \
  "wrapETH2LD(string,address,uint16,address)" \
  "your-label" <OWNER_ADDRESS> 1 0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5 \
  --private-key $SEPOLIA_PRIVATE_KEY --rpc-url $SEPOLIA_RPC_URL
  1. Approve the deployed contracts on NameWrapper — after running deploy:tenant, call setApprovalForAll on the NameWrapper from the wallet that owns the ENS name (if different from the deployer key):
# Approve ForeverSubnameRegistrar and StrategyFactory on NameWrapper (Sepolia)
# Do this via Etherscan Write Contract or cast:
cast send 0x0635513f179D50A207757E05759CbD106d7dFcE8 \
  "setApprovalForAll(address,bool)" \
  <FOREVER_SUBNAME_REGISTRAR_ADDRESS> true \
  --private-key $ENS_OWNER_PRIVATE_KEY --rpc-url $SEPOLIA_RPC_URL

cast send 0x0635513f179D50A207757E05759CbD106d7dFcE8 \
  "setApprovalForAll(address,bool)" \
  <STRATEGY_FACTORY_ADDRESS> true \
  --private-key $ENS_OWNER_PRIVATE_KEY --rpc-url $SEPOLIA_RPC_URL

The deployed addresses are printed by deploy:tenant and stored in deployments.json under tenants.<name>.eth.

Parameters

ignition/parameters/sepolia.json contains shared infrastructure addresses:

{
  "DeployModule": {
    "splitsWarehouse": "0x8fb66F38cF86A3d5e8768f8F1754A24A6c661Fb8",
    "reverseRegistrar": "0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6"
  },
  "Registrar": {
    "nameWrapper": "0x0635513f179D50A207757E05759CbD106d7dFcE8",
    "resolver": "0xE99638b40E4Fff0129D56f03b55b6bbC4BBE49b5",
    "reverseRegistrar": "0xA0a1AbcDAe1a2a4A2EF8e9113Ff0e02DD81DC0C6"
  }
}

Deploy

# 1. Deploy shared infrastructure
bun run deploy:sepolia
# or
bun run deploy:base-sepolia

# 2. Deploy a tenant
bun run deploy:tenant -- --tenant dacc.eth --network sepolia

Verify on Etherscan

bun run verify:sepolia
bun run verify:base-sepolia

# Verify a specific tenant's contracts
bun run verify:tenant -- --tenant dacc.eth --network sepolia

Verify ENS Configuration

bun run verify-ens -- --network sepolia --tenant dacc.eth

Checks parent domain wrapping, registrar/factory approval, factory ENS config, and subname availability.


Mainnet

# 1. Deploy shared infrastructure
bun run deploy:mainnet

# 2. Deploy a tenant
bun run deploy:tenant -- --tenant dacc.eth --network mainnet

Multi-Tenant Deployments

Each tenant gets its own StrategyFactory and ForeverSubnameRegistrar under its own ENS domain:

bun run deploy:tenant -- --tenant <name>.eth --network <network>

This script:

  1. Deploys a new StrategyFactory
  2. On hardhat: registers the parent ENS name if not already registered
  3. Deploys a new ForeverSubnameRegistrar
  4. Configures ENS on the factory (configureENS)
  5. Approves the registrar and factory on NameWrapper
  6. Writes the tenant entry to deployments.json

Tenant config is auto-populated in the SDK and indexer from deployments.json — no manual config editing needed.


After Any Deployment

1. Rebuild the SDK

cd packages/sdk && bun run build

The SDK statically imports deployments.json at build time. Rebuild after any deploy:tenant run to pick up new tenant addresses.

2. Seed strategies (local/testnet)

cd apps/web
PRIVATE_KEY=0x... bun scripts/seed-dacc.ts --network hardhat

3. Configure the indexer

In packages/indexer/ponder.config.ts, enable the chain. In .env.local, set PONDER_RPC_URL_<CHAIN_ID>.


Troubleshooting

  • "Nonce mismatch" during deploy — Delete ignition/deployments/chain-<ID>/ and redeploy with --reset.
  • "ENS not configured" revert — Run deploy:tenant which calls configureENS automatically.
  • "Internal error" revert when creating strategies — ENS misconfigured or parent name not registered. Re-run deploy:tenant.
  • "ENS already configured" — Factory is already set up. Nothing to do.
  • Stale tenant addresses in SDK — Rebuild the SDK: bun run build in packages/sdk.
  • Start fresh on a chain — Delete ignition/deployments/chain-<ID>/ then redeploy.

Security notes

  • Strategy instances are immutable; owner can change allocations but cannot withdraw recipient funds.
  • Funds are distributed into SplitsWarehouse; withdrawals are pull-based by recipients.
  • No upgrade path or admin keys on strategy logic.