Skip to content

feat: add builder data suffix#903

Merged
dan13ram merged 1 commit intostagingfrom
feat/builder-data-suffix
Mar 11, 2026
Merged

feat: add builder data suffix#903
dan13ram merged 1 commit intostagingfrom
feat/builder-data-suffix

Conversation

@dan13ram
Copy link
Collaborator

@dan13ram dan13ram commented Mar 11, 2026

Summary by CodeRabbit

  • New Features

    • Introduced Attribution-based data suffix feature in client configuration, enabling dynamic customization through environment variables for enhanced client behavior flexibility.
  • Updates

    • Refreshed core platform dependencies to latest stable versions, improving overall system compatibility, reliability, and long-term performance.

@vercel
Copy link

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
testnet-nouns-builder Building Building Preview Mar 11, 2026 10:36am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
nouns-builder Ignored Ignored Mar 11, 2026 10:36am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

The PR updates the viem library dependency from ^2.44.2 to ^2.47.1 across the entire monorepo and introduces the ox library (^0.14.0) to apps/web. A new Attribution-based dataSuffix feature is added to Wagmi client configuration, conditionally driven by the NEXT_PUBLIC_BASE_BUILDER_CODE environment variable. Turbo configuration is updated to track .env files globally.

Changes

Cohort / File(s) Summary
Viem Dependency Updates
package.json, apps/web/package.json, packages/auction-ui/package.json, packages/blocklist/package.json, packages/create-dao-ui/package.json, packages/create-proposal-ui/package.json, packages/dao-ui/package.json, packages/feed-ui/package.json, packages/hooks/package.json, packages/proposal-ui/package.json, packages/sdk/package.json, packages/swap/package.json, packages/test-fixtures/package.json, packages/types/package.json, packages/ui/package.json, packages/utils/package.json
Viem peer/regular dependency bumped from ^2.44.2 to ^2.47.1 across all package.json files in monorepo.
Web App Dependencies
apps/web/package.json
Added new ox dependency ^0.14.0 to support Attribution-based dataSuffix feature.
Client Configuration Enhancement
apps/web/src/utils/clientConfig.ts
Imported ox/erc8021 and added conditional dataSuffix computation from NEXT_PUBLIC_BASE_BUILDER_CODE environment variable, injected into client config via object spread when present.
Build Configuration
turbo.json
Expanded globalDependencies to include both "/.env" and "/.env.*local"; added NEXT_PUBLIC_BASE_BUILDER_CODE to globalEnv for build-time availability.
Dependency Reorganization
packages/proposal-ui/package.json
Moved @zoralabs/protocol-deployments from dependencies to devDependencies.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops of joy through version bumps,
Ox and viem in joyful clumps!
Config spreads with builder's pride,
.env trails I'll gently guide.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning No pull request description was provided by the author. The description is entirely missing despite the template requiring sections like Description, Motivation & context, Code review, Type of change, and a checklist. Add a comprehensive description following the repository template, including motivation for the builder data suffix feature, context on why it's needed, and self-review notes.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add builder data suffix' directly describes the main change: adding a data suffix feature for builders, which aligns with the key modifications across package.json files and the new dataSuffix logic in clientConfig.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/builder-data-suffix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/web/src/utils/clientConfig.ts (1)

57-62: Consider adding validation for the builder code format.

The current implementation trims whitespace but doesn't validate the format of NEXT_PUBLIC_BASE_BUILDER_CODE. If the attribution spec expects a specific format (e.g., hex string, specific length), invalid values could produce malformed data suffixes.

💡 Optional: Add format validation
 const baseBuilderCode = process.env.NEXT_PUBLIC_BASE_BUILDER_CODE?.trim()
+
+// Validate builder code format if required by ERC-8021
+const isValidBuilderCode = (code: string | undefined): code is string => {
+  return !!code && code.length > 0 // Add specific format validation as needed
+}
+
-const dataSuffix = baseBuilderCode
+const dataSuffix = isValidBuilderCode(baseBuilderCode)
   ? Attribution.toDataSuffix({
       codes: [baseBuilderCode],
     })
   : undefined
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/utils/clientConfig.ts` around lines 57 - 62, Validate
NEXT_PUBLIC_BASE_BUILDER_CODE after trimming (baseBuilderCode) before passing it
to Attribution.toDataSuffix: check it matches the expected format (e.g., regex
for hex or required length) and only call Attribution.toDataSuffix when the
value is valid; if invalid, handle gracefully by leaving dataSuffix undefined
and optionally logging or throwing a clear error. Update the code around
baseBuilderCode/dataSuffix to perform the format check and include the
validation logic and error-handling path.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/web/src/utils/clientConfig.ts`:
- Around line 57-62: Validate NEXT_PUBLIC_BASE_BUILDER_CODE after trimming
(baseBuilderCode) before passing it to Attribution.toDataSuffix: check it
matches the expected format (e.g., regex for hex or required length) and only
call Attribution.toDataSuffix when the value is valid; if invalid, handle
gracefully by leaving dataSuffix undefined and optionally logging or throwing a
clear error. Update the code around baseBuilderCode/dataSuffix to perform the
format check and include the validation logic and error-handling path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c5fdd959-b652-447e-a766-c2285ade2c65

📥 Commits

Reviewing files that changed from the base of the PR and between cdf72b8 and 2685a21.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • apps/web/package.json
  • apps/web/src/utils/clientConfig.ts
  • package.json
  • packages/auction-ui/package.json
  • packages/blocklist/package.json
  • packages/create-dao-ui/package.json
  • packages/create-proposal-ui/package.json
  • packages/dao-ui/package.json
  • packages/feed-ui/package.json
  • packages/hooks/package.json
  • packages/proposal-ui/package.json
  • packages/sdk/package.json
  • packages/swap/package.json
  • packages/test-fixtures/package.json
  • packages/types/package.json
  • packages/ui/package.json
  • packages/utils/package.json
  • turbo.json

@dan13ram dan13ram merged commit afc2aea into staging Mar 11, 2026
3 of 4 checks passed
@dan13ram dan13ram deleted the feat/builder-data-suffix branch March 11, 2026 10:42
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