feat(builder): enable full ENS featureset with mainnet L1 fallback#401
Open
pasevin wants to merge 4 commits into
Open
feat(builder): enable full ENS featureset with mainnet L1 fallback#401pasevin wants to merge 4 commits into
pasevin wants to merge 4 commits into
Conversation
Bump OpenZeppelin UI packages to 003 floors and statically opt in to enableMainnetL1MissFallback for builder and exported apps. Wire forward and reverse ENS resolution in the builder UI and export templates. Co-authored-by: Cursor <cursoragent@cursor.com>
Revert local .npmrc hacks, pnpm workspace housekeeping, adapters-vite 4.x bump, non-EVM adapter version bumps, and cosmetic placeholder text. Keep only ENS/003 wiring and export boot fixes. Co-authored-by: Cursor <cursoragent@cursor.com>
Pass networkId into proxy AddressNameResolutionProvider displays, add NameResolverBridge to exported app main.tsx, and guard ENS export wiring in verification tests. Co-authored-by: Cursor <cursoragent@cursor.com>
Bump ui-components/ui-renderer floors and wire AddressFieldWithResolvedPreview with ResolvedAddressFieldPreviewWithNameResolution across builder address surfaces and export dependency pins. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the builder and export pipeline to the latest OpenZeppelin UI/adapters needed for the “003 ENS floors” behavior, and wires in the full ENS feature set (forward + reverse) with a static enableMainnetL1MissFallback opt-in for both the builder runtime and generated exported apps.
Changes:
- Bumps OpenZeppelin UI packages and adapter versions/pins across the workspace and export versioning.
- Enables ENS runtime behavior via
CreateRuntimeOptions(including mainnet L1 miss fallback) and bridges name resolution into UI components/providers. - Updates export templates/generators and dependency handling to ensure wallet-stack dependencies are installed/hoisted/pre-bundled, plus adds verification tests and snapshot updates.
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Updates workspace overrides to newer OpenZeppelin UI package versions. |
| pnpm-lock.yaml | Lockfile refresh reflecting updated OpenZeppelin packages/adapters and new transitive deps. |
| apps/builder/vite.config.ts | Adds eventemitter3 aliasing and pre-bundling to fix Vite CJS/ESM interop for wallet deps. |
| apps/builder/src/export/versions.ts | Updates pinned versions for exported apps to the new UI/adapters set. |
| apps/builder/src/export/templates/typescript-react-vite/vite.config.ts | Template-level Vite interop workaround + optimizeDeps include updates for wallet deps. |
| apps/builder/src/export/templates/typescript-react-vite/package.json | Updates exported template dependencies to newer UI packages (incl. ui-react/ui-types). |
| apps/builder/src/export/templates/typescript-react-vite/.npmrc | Adds public hoist patterns needed for pnpm + Vite optimizeDeps with wallet stacks. |
| apps/builder/src/export/PackageManager.ts | Adds wallet interop deps for EVM/Polkadot exports; applies external dependency floors. |
| apps/builder/src/export/generators/ViteConfigGenerator.ts | Generates Vite configs that alias/prebundle wallet CJS deps and merges adapter optimizeDeps include. |
| apps/builder/src/export/dependencyFloors.ts | Introduces dependency “floors” (e.g., viem) to guarantee ENS-compatible minimum versions. |
| apps/builder/src/export/codeTemplates/main.template.tsx | Generated app main.tsx now enables name-resolution fallback and bridges runtime resolver into UI provider. |
| apps/builder/src/export/tests/PackageManager.test.ts | Updates expectations for dependency floors (viem) and related dependency pin behavior. |
| apps/builder/src/export/tests/EnsExportPins.verification.test.ts | Adds an integration-style verification test for ENS export pins and shipped template files. |
| apps/builder/src/export/tests/dependencyFloors.test.ts | Adds unit tests for dependency floor behavior. |
| apps/builder/src/export/tests/snapshots/ExportSnapshotTests.test.ts.snap | Snapshot updates for new exported dependency pins (including viem floor + wallet deps). |
| apps/builder/src/core/ecosystemManager.ts | Adds runtime creation options and threads them through createRuntime for ENS fallback. |
| apps/builder/src/core/tests/ecosystemManager.test.ts | Updates tests to assert runtime creation options are passed into adapter createRuntime. |
| apps/builder/src/contexts/NameResolverBridge.tsx | New bridge component to connect runtime name resolver to NameResolverProvider. |
| apps/builder/src/components/warnings/ProxyStatusIndicator.tsx | Wraps address displays with reverse name-resolution provider for proxy/admin/implementation addresses. |
| apps/builder/src/components/UIBuilder/StepFormCustomization/FieldBasicSettings.tsx | Uses a richer blockchain-address field component to show resolved preview/name behavior. |
| apps/builder/src/components/UIBuilder/StepFormCustomization/components/UiKitSettings.tsx | Same rich blockchain-address field handling for UI kit config fields. |
| apps/builder/src/components/UIBuilder/StepFormCustomization/components/EoaConfiguration.tsx | Uses rich blockchain-address field for “specific EOA address” input with network scoping. |
| apps/builder/src/components/UIBuilder/StepContractDefinition/components/ContractSuccessStatus.tsx | Passes networkId into proxy status indicator for name-resolution scoping. |
| apps/builder/src/components/UIBuilder/StepContractDefinition/components/ContractFormFields.tsx | Uses rich blockchain-address field component for contract definition inputs. |
| apps/builder/src/components/fields/BlockchainAddressFieldWithRichPreview.tsx | New field component combining resolved preview + name-resolution-aware renderer preview. |
| apps/builder/src/components/AddressBook/AddressBookDialog.tsx | Enables name resolution in the address book widget. |
| apps/builder/src/App.tsx | Wraps app subtree with NameResolverBridge and ensures runtime creation options are applied. |
| apps/builder/package.json | Updates OpenZeppelin UI package versions and adds wallet interop deps (debug/eventemitter3). |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+135
to
+158
| function buildOptimizeDepsInclude(adapterInclude?: string): string { | ||
| const always = ["'eventemitter3'", "'debug'"]; | ||
|
|
||
| if (!adapterInclude) { | ||
| return ` include: [${always.join(', ')}],`; | ||
| } | ||
|
|
||
| const raw = adapterInclude.trim(); | ||
| // Expected shape: `include: [ ... ]` (possibly multiline) | ||
| if (raw.startsWith('include:')) { | ||
| const listStart = raw.indexOf('['); | ||
| const listEnd = raw.lastIndexOf(']'); | ||
| if (listStart >= 0 && listEnd > listStart) { | ||
| const inner = raw.slice(listStart + 1, listEnd).trim(); | ||
| if (!inner) { | ||
| return ` include: [${always.join(', ')}],`; | ||
| } | ||
| return ` include: [\n ${always.join(',\n ')},\n ${inner}\n ],`; | ||
| } | ||
| } | ||
|
|
||
| // Fallback: keep adapter snippet and prepend a second include is not valid — wrap defaults only | ||
| return ` include: [${always.join(', ')}],\n ${raw}`; | ||
| } |
Comment on lines
169
to
+173
| '@wagmi/core', | ||
| '@wagmi/connectors', | ||
| '@rainbow-me/rainbowkit', | ||
| // WalletConnect / wagmi transitive — see eventemitter3CjsEntry note above | ||
| 'eventemitter3', |
Comment on lines
+5
to
+7
| * Example: adapter-evm@2.2.0 peers require viem ^2.35.0 (ENS v2), but its | ||
| * AdapterConfig still advertises viem ^2.28.0 for exported apps. PackageManager | ||
| * elevates any listed dependency to at least these floors. |
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
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.
Summary
ui-components^3.5.0,ui-react^3.2.0,ui-renderer^3.3.0,ui-types/ui-utils^3.3.0,adapter-evm^2.3.0).enableMainnetL1MissFallbackin builder runtime creation and exported appmain.tsxgeneration.NameResolverBridge, reverse viaAddressNameResolutionProvider) and align export templates/dependency pins.Test plan
pnpm install(lockfile clean — no localfile:/.tgzcontamination)pnpm typecheck(apps/builder)pnpm lint(apps/builder)pnpm build(apps/builder)pnpm test(apps/builder — 314 tests passed)Made with Cursor