Skip to content

Redesign droposal builder + 0xSplits revenue-split payout#982

Draft
sktbrd wants to merge 2 commits into
BuilderOSS:stagingfrom
sktbrd:feat/m3-0xsplits-droposal
Draft

Redesign droposal builder + 0xSplits revenue-split payout#982
sktbrd wants to merge 2 commits into
BuilderOSS:stagingfrom
sktbrd:feat/m3-0xsplits-droposal

Conversation

@sktbrd

@sktbrd sktbrd commented Jul 15, 2026

Copy link
Copy Markdown

Description

Redesigns the droposal builder and adds optional 0xSplits revenue-split support.

Layout — the flat field list is regrouped into scannable sections (Collection · Artwork · Sale · Revenue) plus a collapsible Advanced section that holds edition type/size, royalty, mint-limit-per-address, and default admin. Defaults follow the friendlier Gnars pattern: open edition and unlimited mints per wallet unless changed in Advanced. Built on zord tokens + vanilla-extract only; all Formik field wiring is unchanged.

Revenue split (0xSplits) — an optional "use revenue split" card deploys a 0xSplits v1 split from the connected wallet (@0xsplits/splits-sdk, wagmi-native) and sets it as the droposal fundsRecipient. Recipients are validated (addresses, unique, allocations totalling 100%) and visualized with a Sankey-style flow chart (flow width = allocation %). Ported from the production Gnars pattern (r4topunk/gnars-website), adapted from thirdweb to wagmi.

Motivation & context

  • The droposal payout field already documents that it "can be … an external splits contract" — this lets proposers create one inline instead of deploying elsewhere and pasting an address.
  • The builder's flat ~13-field form is hard to scan; grouping + an Advanced section (with sensible defaults) matches the friendlier Gnars flow while keeping every field available.

Part of Gnars DAO Proposal 61, Milestone 3 (0xSplits Integration).

Code review

  • Split creation is a client-side wallet transaction, not a governance transaction — the split must exist before the droposal references it. Gated via ContractButton (handles connect / chain-switch).
  • Open-edition default relies on maxSupply: 0 → UINT64_MAX and unlimited-per-wallet on maxPerAddress empty → UINT32_MAX (existing Droposal.tsx encoding).
  • Pure split validation is unit-tested (splits.test.ts, 9 cases).
  • New dependency: @0xsplits/splits-sdk — flagged explicitly (repo favours minimal deps). Happy to swap for a direct viem SplitMain.createSplit encoding (no SDK) if preferred.
  • Scoped out (follow-up): the sticky preview rail lives in the shared proposal-builder shell, so it's intentionally left for a separate PR to avoid touching UI beyond droposals.
  • Not browser-previewable without a wallet + testnet (on-chain / financial).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have done a self-review of my own code
  • Any new and existing tests pass locally with my changes
  • My changes generate no new warnings (lint warnings, console warnings, etc)

🤖 Generated with Claude Code

Milestone 3 (Gnars Prop 61) — 0xSplits Integration.

Lets a droposal route mint proceeds + royalties to a multi-recipient
0xSplits split instead of a single address:
- splits util: recipient/config types + validation (>=2 recipients, valid
  unique addresses, allocations totalling 100%, <=4 decimals), ported from
  the production Gnars pattern.
- useCreateSplit: deploys a 0xSplits v1 split from the connected wallet via
  @0xsplits/splits-sdk, wagmi-native (viem clients directly, no thirdweb bridge).
- SplitRecipients UI in the Droposal form: an optional "split payout among
  multiple recipients" section that, on create, sets the split address as the
  droposal funds recipient.

Split creation is a wallet action (not a governance transaction), matching the
Gnars pattern. Adds @0xsplits/splits-sdk as a create-proposal-ui dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

@sktbrd is attempting to deploy a commit to the Nouns Builder Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c16d371b-1d53-4ae1-bf49-dda30039a394

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- Regroup the flat droposal field list into sections (Collection, Artwork,
  Sale, Revenue) plus an Advanced section holding edition type/size, royalty,
  mint-limit-per-address, and default admin. Defaults follow the friendlier
  Gnars pattern: open edition + unlimited mints per wallet unless changed in
  Advanced (maxSupply 0 -> UINT64_MAX, maxPerAddress empty -> UINT32_MAX).
- Revenue split: card-style toggle + Sankey-style flow chart visualizing each
  recipient's allocation; allocation progress bar.
- Fix split creation gating: use ContractButton (connect / chain-switch) and
  the connected wallet client, instead of a chainId-scoped walletClient that
  misread as "wallet not connected".

Built on zord tokens + vanilla-extract only; all Formik field wiring unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sktbrd sktbrd changed the title Add 0xSplits payout to the droposal builder Redesign droposal builder + 0xSplits revenue-split payout Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant