Skip to content

Conversation

jlm0
Copy link
Collaborator

@jlm0 jlm0 commented Sep 27, 2025

Migrates to juice-sdk-react v5.0.1 and juice-sdk-core v2.1.0 to enable support for v5 contracts and routing.

jlm0 added 28 commits September 26, 2025 21:47
- Replace deprecated hooks with wagmi patterns
- Move ABIs from juice-sdk-react to juice-sdk-core
- Update contract address access patterns
- Fix TypeScript and linting issues
…nProvider

- Updated useV4ProjectHeader hook to use dynamic version
- Updated useDownloadPayments hook to use dynamic version
- Updated V4TokenHoldersModal components to use dynamic version
- All components now get version from V4V5VersionProvider context
- Added getContractVersionString utility for version conversion
- Updated useDeployOmnichainProject to accept version parameter (defaults to v5)
- Updated useStandardProjectLaunchData to use dynamic version
- Updated useNftProjectLaunchData to use dynamic version
- Modified LaunchProjectModal to use v5 for new project creation
- Updated useEditRulesetTx to use dynamic version from context
- Renamed V4ProjectDashboard directory to V4V5ProjectDashboard
- Renamed V4ProjectSettings directory to V4V5ProjectSettings
- Renamed V4ProjectDashboard.tsx to V4V5ProjectDashboard.tsx
- Updated all imports and references to use new naming
- Components now properly reflect support for both v4 and v5
- Fixed contract version handling for v4 vs v5 differences
- Updated all import paths after directory renaming
- Fixed dynamic version usage in deployment hooks
- Added proper type guards for chainId checks
- Added default export for ProjectSettingsDashboard
- Simplified V4V5VersionProvider to use defaultVersion for now
…ion support

- Renamed all V4* files to V4V5* throughout v4v5 package
- Renamed all useV4* hook files to useV4V5*
- Updated directory structure from V4* to V4V5*
- This prepares the codebase for supporting both v4 and v5 versions
- Updated all component/function/interface/type names from V4* to V4V5*
- Updated all hook names from useV4* to useV4V5*
- Fixed all import paths to use new V4V5* file names
- Updated enum values like V4OperatorPermission to V4V5OperatorPermission
- Fixed V4CurrencyName references to V4V5CurrencyName
- This completes the migration of component names for dual v4/v5 support
- Fixed useV4NftRewards to useV4V5NftRewards
- Fixed useV4UserNftCredits to useV4V5UserNftCredits
- Fixed useV4UserTotalTokensBalance to useV4V5UserTotalTokensBalance
- Fixed useV4TokensPanel to useV4V5TokensPanel
- Fixed other remaining useV4* hooks to useV4V5*
- Fixed V4ProjectToolsDrawer import to V4V5ProjectToolsDrawer
- All V4 references now properly migrated to V4V5 for dual version support
- Rename all V4 components and hooks to V4V5 for dual version support
- Add PV_V5 constant and feature flag support
- Update GraphQL codegen to use v4v5 paths instead of v4
- Add version field to project GraphQL queries
- Update V4V5VersionProvider to fetch version from bendystraw
- Rename v4Metadata to v4v5Metadata for unified metadata fetching
- Add v5 project filtering in projects list view
- Update all imports and references from v4 to v4v5
- Support dynamic version selection in SDK contract addresses
…deployment

V5 contracts have stricter validation and reject timestamps in the past. The value '1' (January 1, 1970) was being rejected. Setting it to '0' allows the transformation logic to properly use the current timestamp instead.
- Remove all version detection logic from creation hooks
- Hardcode to v5 protocol for project creation
- Remove unused v4Controller and v5Controller variables
- Fix TypeScript type definition to use jbControllerAbi instead of jbController4_1Abi
- Simplify controller selection logic by removing unnecessary conditionals
- Clean up unused controllerData variables in deployment hooks
…ction

- Move V4V5VersionProvider to top level of all v4/v5 pages
- Remove defaultVersion prop from V4V5ProjectProviders, now uses useV4V5Version hook
- Simplify V4V5SettingsProvider by removing internal version provider wrapper
- Fix v5 settings pages to match v4's lightweight pattern (remove duplicate provider stacks)
- Add V4V5VersionProvider to all settings pages for proper version propagation
- Version now dynamically detected from URL pathname (/v4/* or /v5/*)
- Add useV4V5Version hook to 30+ components and hooks
- Replace hardcoded jbContractAddress['4'] with dynamic version selection
- Maintain v4-specific logic for JBController4_1 where appropriate
- Fix TypeScript errors and ESLint warnings
- Ensure both v4 and v5 projects use correct contract addresses
@mejango mejango merged commit 59013fe into dev Oct 1, 2025
4 checks passed
@mejango mejango deleted the fix/juice-sdk-v5-migration branch October 1, 2025 00:10
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.

2 participants