Skip to content

Add Juicebox V6 support; create flow launches V6 projects#4699

Open
mejango wants to merge 3 commits into
devfrom
feat/v6
Open

Add Juicebox V6 support; create flow launches V6 projects#4699
mejango wants to merge 3 commits into
devfrom
feat/v6

Conversation

@mejango

@mejango mejango commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds full Juicebox V6 support alongside V4/V5 (mirroring how V5 sits next to V4 in the shared v4v5 package), and switches the create flow to launch V6 projects.

SDK: now consumes @bananapus/nana-sdk-core@1.0.0 / @bananapus/nana-sdk-react@1.0.0 (the former juice-sdk-core/juice-sdk-react, republished under the @bananapus scope with V6 support — jbContractAddress['6'], canonical ABIs = V6 with version-suffixed *V5Abi/*V4Abi exports wherever the older interface drifted).

Create flow → V6

  • create/index.tsx provider pins defaultVersion={6}; controller/terminal/prices addresses are keyed by version.
  • Every v6 launch sends msg.value = JBProjects.creationFee() exactly (v6 requirement) — direct controller launches, 721 launches, Safe proposals, and Relayr omnichain launches (value + version threaded through the forward request).
  • Omnichain deploys use the v6 JBOmnichainDeployer.launchProjectFor overloads (sucker deployment configuration is now an inline arg; parseSuckerDeployerConfig(..., { version: 6 }) emits the v6 bytes32 peer/remoteToken shape).
  • v6 projects register the JBRouterTerminalRegistry alongside the multi terminal (empty accounting contexts) so they accept any token — same pattern the v6 protocol deployments use.
  • Ruleset metadata and 721 tier configs are dual-keyed so a single object encodes correctly under both the v4/v5 and v6 ABIs: the v6 scopeCashOutsToLocalBalances flag has inverted semantics vs v5's useTotalSurplusForCashOuts; v6 tiers use nested flags, splitPercent/splits, encodedIpfsUri casing, and drop prices.
  • New-project id parsing from receipts is now signature-based (the project NFT mint Transfer), position-independent across versions and launch paths.

V4/V5 stay correct after the canonical-ABI flip

Everywhere the canonical (now-V6) ABIs would silently mis-target older contracts, calls branch by version: edit-ruleset (direct/omnichain/Safe — v6 queueRulesetsOf dropped the trailing controller arg), NFT-rewards resolution (dataHookOf split into tiered721HookOf/extraDataHookOf in v6; revnet fallback reads REVOwner on v6), 721 tier editing (adjustTiers shapes), cross-chain ruleset reads (renamed metadata bool normalized to v6 semantics), and terminal-fee display (v6 made the 2.5% fee a compile-time constant — new useTerminalFee hook).

Version plumbing & explore

  • V4V5VersionProvider detects /v6 routes (bendystraw's per-project version remains authoritative); new /v6/[jbUrn] + settings pages; PV6; FEATURE_FLAGS.V6 (default on); v6ProjectRoute; v6 approval-hook deadlines with cross-version ballot remapping; USD_CURRENCY_ID(6).
  • v6 projects flow through the supabase project sync, projects view (new V6 filter checkbox), trending/homepage/search cards, and the protocol activity feed — all linking /v6/... per row.

Verification

🤖 Generated with Claude Code

mejango and others added 3 commits July 14, 2026 22:31
- SDK moved to @bananapus/nana-sdk-core / @bananapus/nana-sdk-react @1.0.0
  (jbContractAddress['6'], canonical-v6 ABIs with version-suffixed V5/V4 exports).
- Version plumbing: V4V5VersionProvider detects /v6 routes (bendystraw still
  authoritative); /v6/[jbUrn] pages; PV6; FEATURE_FLAGS.V6; v6ProjectRoute;
  v6 approval-hook deadlines; USD currency id via USD_CURRENCY_ID(6).
- Create flow launches V6: controller/terminal/prices addresses keyed by version,
  msg.value = exact JBProjects.creationFee on every v6 launch (direct, 721, Safe,
  and Relayr omnichain), v6 JBOmnichainDeployer launchProjectFor overloads with
  inline sucker configuration (parseSuckerDeployerConfig version 6), and the
  JBRouterTerminalRegistry registered alongside the multi terminal so v6 projects
  accept any token. Ruleset metadata and 721 configs are dual-keyed so one object
  encodes correctly under v4/v5 and v6 ABIs (the cash-out scope flag has inverted
  semantics in v6; 721 tiers gained nested flags/splits and dropped prices).
- v4/v5 stay correct after the canonical-ABI flip: edit-ruleset, omnichain edit,
  NFT rewards resolution (dataHookOf → tiered721HookOf/REVOwner in v6), 721 tier
  editing, and terminal-fee reads (v6 fee is a constant) all branch per version.
- Listing/explore: v6 projects flow through supabase sync, projects view filter,
  trending/homepage/search cards, and protocol activity with /v6 links.
- projectId receipt parsing is now signature-based (project NFT mint Transfer),
  position-independent across versions and launch paths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Settings close/success links routed v6 (and any non-5) projects to /v4;
  use v4v5ProjectRoute with the context version.
- The v6 project page's SEO/og URL advertised the /v5 route.
- The create page gate now matches the v6 pages' feature flag.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mejango

mejango commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Note on CI: Compile Typescript / Run tests fail at the codegen step because the repo's SUBGRAPH_URL secret points at a decommissioned host (ethereum-mainnet.graph-eu.p2pify.com — DNS no longer resolves). This is pre-existing — main's CI has failed the same way since at least February. Updating the secret to the current subgraph endpoint (the production site uses https://api.subgraph.migration.ormilabs.com/api/public/.../subgraphs/juicebox/v0.0.1/gn) should turn CI green.

Local verification of this branch with working env: full codegen + tsc --noEmit = 0 errors (main's baseline carries ~20 latent errors this PR also fixes), next build completes, and a served production build passes SSR smoke tests — /create (now v6), /v6/sep:5 (live V6 project renders), /v4/eth:1 and /v5/eth:1 (no regression). An adversarial review pass over the full diff ran; its findings (v6 settings links routing to /v4, v5 SEO URL on v6 pages) are fixed in 515c490.

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