-
-
Notifications
You must be signed in to change notification settings - Fork 128
fix: migrate to juice-sdk v5 for newer contract support #4675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+3,218
−2,089
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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
…c version support
…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
…fallback strategies
…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/*)
…ojectHeader for dynamic settings path
…iewConfirmModal for improved tracking
mejango
reviewed
Sep 29, 2025
src/packages/v4v5/views/V4V5ProjectSettings/EditCyclePage/hooks/useOmnichainEditCycle.ts
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
...kages/v4v5/views/V4V5ProjectSettings/EditCyclePage/ReviewConfirmModal/ReviewConfirmModal.tsx
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
...V5ProjectDashboard/V4V5ProjectTabs/V4V5TokensPanel/hooks/useV4V5BalanceMenuItemsUserFlags.ts
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5TokensPanel/V4V5MintModal.tsx
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
...s/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5TokensPanel/V4V5DistributeReservedTokensModal.tsx
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
...ges/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5TokensPanel/V4V5ClaimTokensModal.tsx
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
...s/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5CyclesPayoutsPanel/V4V5DistributePayoutsModal.tsx
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
src/packages/v4v5/hooks/useTransferOmnichainProjectOwnership.ts
Outdated
Show resolved
Hide resolved
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
mejango
reviewed
Sep 29, 2025
src/packages/v4v5/hooks/JB721Delegate/transactor/useLaunchProjectWithNftsTx.ts
Outdated
Show resolved
Hide resolved
- 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
… improved compatibility
mejango
approved these changes
Oct 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrates to juice-sdk-react v5.0.1 and juice-sdk-core v2.1.0 to enable support for v5 contracts and routing.