Conversation
- Create flow deploys via the v6 REVDeployer.deployFor (4-arg overload; terminals, buyback hook, and loans are baked into the deployer) with the exact JBProjects creation fee as msg.value, v6 CCIP sucker deployers, and the v6 ERC-2771 forwarder for Relayr. New revnets launch on V6 only. - View/manage flows stay version-aware for existing v4/v5 revnets: version-suffixed ABIs where interfaces drifted (currentSurplusOf, currentReclaimableSurplusOf, borrowFrom, reallocateCollateralFromLoan, borrowableAmountFrom via a normalizing hook, autoIssueFor via REVOwner on v6, REVLoans MIN_PREPAID_FEE_PERCENT in place of the removed REVDeployer.FEE). - Payments in non-accounting tokens route through the v6 JBRouterTerminalRegistry (replaces the swap terminal registries). - Bridge send (sucker prepare) uses the v6 bytes32-beneficiary signature; manual v6 claim UI awaits juicerkle v6 support (the keeper auto-processes v6 claims). - Homepage top projects include v5 and v6 groups and link per-row by version; $REV links point at the v6 revnet. - Requires juice-sdk-core ^3.0.0 and juice-sdk-react ^6.0.0 (Bananapus/juice-sdk-v4#25); run yarn install once those are published. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The juice-sdk-core/juice-sdk-react npm names aren't publishable by the team; the SDK now ships under the @Bananapus scope at 1.0.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Update: the SDK is being republished as @bananapus/nana-sdk-core@1.0.0 / @bananapus/nana-sdk-react@1.0.0 (Bananapus/juice-sdk-v4#27) since the old npm names aren't publishable. This PR now imports from the scoped names and pins ^1.0.0. Once #27 merges and the Release workflow publishes, run |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Migrate the app's hand-rolled V6 protocol logic onto the SDK's framework-agnostic action layer (nana-sdk-core 1.1.x, nana-sdk-react 2.0.0): - BridgeDialog: build the v6 sucker `prepare` request with buildBridgePrepareTx (handles bytes32 beneficiary padding + zeroHash metadata); delete the local jbSuckerV6Abi copy in favor of the SDK's. - create/page: read the project creation fee via getProjectCreationFee and drive encodeFunctionData / gas estimate / Relayr from the request returned by parseDeployData. - parseDeployData: build stages with buildRevnetStageConfig, the reserve asset context with buildAccountingContext (token-keyed currency computed by the builder), and return a buildDeployRevnetTx request. Split-group percents now run through fillSplitPercents, fixing a latent revert when per-row rounding drifted the group away from an exact 1e9 total. - useBorrowDialog: v6 borrowFrom / reallocateCollateralFromLoan writes go through buildBorrowTx / buildReallocateCollateralTx. - AutoIssuance: v6 branch uses buildAutoIssueTx. - paymentTerminal: v6 resolution goes through resolvePaymentTerminal (router-registry fallback); v4/v5 logic untouched. - tsconfig: moduleResolution "node" -> "bundler" so the package's /v6 subpath export resolves (webpack already resolved it; tsc now does too). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Follow-up commit c43e79b migrates the app's hand-rolled v6 protocol logic onto the SDK's new |
Summary
Adds Juicebox V6 support end-to-end and makes V6 the only version new revnets launch on. Existing V4/V5 revnets remain fully viewable and manageable.
Depends on Bananapus/juice-sdk-v4#25 — this PR pins
juice-sdk-core@^3.0.0/juice-sdk-react@^6.0.0, which publish when that PR merges (changesets). Runyarn installto refreshyarn.lockonce they're on npm.Create flow → V6 only
parseDeployDatabuilds the v6REVDeployer.deployForargs (4-arg overload — the v6 deployer bakes in the multi terminal, router terminal registry, buyback hook, and REVLoans, and deploys a default 721 hook internally).REVConfigusesoperator+scopeCashOutsToLocalBalances.JBProjects.creationFee()per chain and sends it as the tx value — v6 requires the exact fee; the ERC-2771 forward request and Relayr bundle carry it (SDK support added in the SDK PR).parseSuckerDeployerConfig(..., { version: 6 })— v6 per-remote-chain CCIP deployers, bytes32 peer/remoteToken shape./v6:; there was no version picker to remove — the create flow's implicit version flips to 6.View/manage flows stay multi-version
currentSurplusOf(3 surplus hooks),currentReclaimableSurplusOf(same selector-trap noted inline: empty arrays encode identically but the selector differs),borrowFrom,reallocateCollateralFromLoan,borrowableAmountFrom(v6 returns(borrowableNow, borrowableCapacity)— normalized by a newuseBorrowableAmountFromhook), auto-issuance (moved to the newREVOwnercontract in v6), and the fixed loan fee (REVLoans.MIN_PREPAID_FEE_PERCENTreplacesREVDeployer.FEE).JBRouterTerminalRegistry(replaces the swap-terminal registries).prepareuses the v6 signature (bytes32 beneficiary, opaque metadata) via a minimal vendored v6 sucker ABI.toRemoteis unchanged. Manual claim UI for v6 still uses the juicerkle service, which doesn't serve v6 leaf shapes yet (bytes32 beneficiary + metadata) — the keeper auto-processes v6 claims in the meantime.version_in: [5, 6]with per-row version links;$REVlinks point at the v6 revnet (/v6:eth:3).graphql.schema.json/src/generated/*are regenerated output (yarn generate:gqlagainst the live bendystraw schema).Verification
tsc --noEmitandnext buildpass against the locally built SDK from the SDK PR.parseDeployData+parseSuckerDeployerConfig({version: 6})against the deployed v6REVDeployer, withvalue = creationFee(1e14 wei): a multichain ETH revnet (Sepolia ↔ OP-Sepolia CCIP sucker, 2 stages, auto-issuance, splits) and a single-chain USDC-reserve revnet both returned a valid(revnetId, hook).🤖 Generated with Claude Code