Redesign droposal builder + 0xSplits revenue-split payout#982
Conversation
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>
|
@sktbrd is attempting to deploy a commit to the Nouns Builder Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
- 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>
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 droposalfundsRecipient. 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
Part of Gnars DAO Proposal 61, Milestone 3 (0xSplits Integration).
Code review
ContractButton(handles connect / chain-switch).maxSupply: 0 → UINT64_MAXand unlimited-per-wallet onmaxPerAddressempty →UINT32_MAX(existingDroposal.tsxencoding).splits.test.ts, 9 cases).@0xsplits/splits-sdk— flagged explicitly (repo favours minimal deps). Happy to swap for a direct viemSplitMain.createSplitencoding (no SDK) if preferred.Type of change
Checklist
🤖 Generated with Claude Code