Skip to content

Update default config #7859

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
merged 1 commit into from
Aug 15, 2025
Merged

Update default config #7859

merged 1 commit into from
Aug 15, 2025

Conversation

kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented Aug 15, 2025


PR-Codex overview

This PR removes the THIRDWEB_PUBLISHER_ADDRESS constant from the addresses.ts file and updates the CustomContractForm component in custom-contract.tsx to remove its dependency on this constant, simplifying the fee configuration logic.

Detailed summary

  • Removed THIRDWEB_PUBLISHER_ADDRESS from addresses.ts.
  • Updated custom-contract.tsx to eliminate references to THIRDWEB_PUBLISHER_ADDRESS.
  • Simplified hasInbuiltDefaultFeeConfig logic by only checking defaultFeeRecipientFunction.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Bug Fixes
    • Consistent platform-fee selection on deployment: if a default fee recipient is set, the updated default fee rate is applied on non–zero-fee chains regardless of publisher.
  • Chores
    • Removed an unused publisher address from configuration and introduced updated default fee rates (including a new lower default fee option).

@kumaryash90 kumaryash90 requested review from a team as code owners August 15, 2025 10:06
Copy link

changeset-bot bot commented Aug 15, 2025

⚠️ No Changeset found

Latest commit: 930fe44

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Aug 15, 2025

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

Project Deployment Preview Comments Updated (UTC)
thirdweb-www Ready Ready Preview Comment Aug 15, 2025 3:14pm
4 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs-v2 Skipped Skipped Aug 15, 2025 3:14pm
nebula Skipped Skipped Aug 15, 2025 3:14pm
thirdweb_playground Skipped Skipped Aug 15, 2025 3:14pm
wallet-ui Skipped Skipped Aug 15, 2025 3:14pm

Copy link
Contributor

coderabbitai bot commented Aug 15, 2025

Walkthrough

hasInbuiltDefaultFeeConfig in CustomContractForm now depends only on the existence of DEFAULT_FEE_RECIPIENT. platformFeeBps on non-zero-fee chains uses DEFAULT_FEE_BPS_NEW when DEFAULT_FEE_RECIPIENT exists; otherwise it uses DEFAULT_FEE_BPS. THIRDWEB_PUBLISHER_ADDRESS was removed and two DEFAULT_FEE_BPS constants were added.

Changes

Cohort / File(s) Summary of Changes
Fee config logic update
apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx
Simplified hasInbuiltDefaultFeeConfig to check only for DEFAULT_FEE_RECIPIENT; removed dependency on publisher address/THIRDWEB_PUBLISHER_ADDRESS. Updated platformFeeBps selection for non-zero-fee chains: use DEFAULT_FEE_BPS_NEW when DEFAULT_FEE_RECIPIENT exists, else DEFAULT_FEE_BPS.
Address constants cleanup
apps/dashboard/src/@/constants/addresses.ts
Removed exported constant THIRDWEB_PUBLISHER_ADDRESS. Added DEFAULT_FEE_BPS = 250 and DEFAULT_FEE_BPS_NEW = 200. Other address exports unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant F as CustomContractForm
  participant D as Deployment Logic
  participant C as Chain

  U->>F: Initiate deployment
  F->>D: Build deployment params
  D->>D: Check DEFAULT_FEE_RECIPIENT existence
  alt Non-zero-fee chain
    alt DEFAULT_FEE_RECIPIENT exists
      D->>D: platformFeeBps = DEFAULT_FEE_BPS_NEW
    else
      D->>D: platformFeeBps = DEFAULT_FEE_BPS
    end
  else
    D->>D: platformFeeBps per zero-fee rules
  end
  D->>C: Deploy contract with params
  C-->>U: Deployment result
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~7 minutes

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 930fe44 and 6f581c8.

📒 Files selected for processing (2)
  • apps/dashboard/src/@/constants/addresses.ts (0 hunks)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx (1 hunks)
💤 Files with no reviewable changes (1)
  • apps/dashboard/src/@/constants/addresses.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yash/update-deploy-config-2

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

graphite-app bot commented Aug 15, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Aug 15, 2025
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.34%. Comparing base (b1ac15c) to head (6f581c8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7859   +/-   ##
=======================================
  Coverage   56.34%   56.34%           
=======================================
  Files         905      905           
  Lines       58834    58834           
  Branches     4150     4150           
=======================================
  Hits        33151    33151           
  Misses      25577    25577           
  Partials      106      106           
Flag Coverage Δ
packages 56.34% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx (1)

221-221: Coerce to boolean for clarity and type-safety

hasInbuiltDefaultFeeConfig should be a boolean, not the ABI entry object. Coercing makes intent explicit and prevents accidental misuse.

Apply this diff:

-  const hasInbuiltDefaultFeeConfig = defaultFeeRecipientFunction;
+  const hasInbuiltDefaultFeeConfig = Boolean(defaultFeeRecipientFunction);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b1ac15c and 6fa6a96.

📒 Files selected for processing (1)
  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Write idiomatic TypeScript with explicit function declarations and return types
Limit each file to one stateless, single-responsibility function for clarity
Re-use shared types from @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

Load heavy dependencies inside async paths to keep initial bundle lean (lazy loading)

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx
apps/{dashboard,playground-web}/**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

apps/{dashboard,playground-web}/**/*.{ts,tsx}: Import UI primitives from @/components/ui/* (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground apps
Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Use Tailwind CSS only – no inline styles or CSS modules
Use cn() from @/lib/utils for conditional class logic
Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Server Components (Node edge): Start files with import "server-only";
Client Components (browser): Begin files with 'use client';
Always call getAuthToken() to retrieve JWT from cookies on server side
Use Authorization: Bearer header – never embed tokens in URLs
Return typed results (e.g., Project[], User[]) – avoid any
Wrap client-side data fetching calls in React Query (@tanstack/react-query)
Use descriptive, stable queryKeys for React Query cache hits
Configure staleTime/cacheTime in React Query based on freshness (default ≥ 60s)
Keep tokens secret via internal API routes or server actions
Never import posthog-js in server components

Files:

  • apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx (1)

552-559: Confirm broader default fee logic for ABI-based configs

During review we verified that in apps/dashboard/src/app/(app)/(dashboard)/published-contract/components/custom-contract.tsx:

  • The flag hasInbuiltDefaultFeeConfig (line 217) is now set solely by detecting a DEFAULT_FEE_RECIPIENT function in the contract’s ABI—no longer gated by the thirdweb publisher address.
  • Consequently, in the deploy params (lines 557–559), platformFeeBps falls back to DEFAULT_FEE_BPS_NEW for any contract exposing DEFAULT_FEE_RECIPIENT, not just thirdweb-published ones.

This change broadens the scope of the new default fee BPS. Please confirm whether this wider application is intentional.

Copy link
Contributor

github-actions bot commented Aug 15, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 64.06 KB (0%) 1.3 s (0%) 202 ms (+111.02% 🔺) 1.5 s
thirdweb (cjs) 357.05 KB (0%) 7.2 s (0%) 633 ms (+8.58% 🔺) 7.8 s
thirdweb (minimal + tree-shaking) 5.73 KB (0%) 115 ms (0%) 65 ms (+1384.64% 🔺) 180 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 54 ms (+2081.68% 🔺) 65 ms
thirdweb/react (minimal + tree-shaking) 19.15 KB (0%) 383 ms (0%) 59 ms (+434.6% 🔺) 442 ms

@vercel vercel bot temporarily deployed to Preview – docs-v2 August 15, 2025 14:46 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 15, 2025 14:46 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 15, 2025 14:46 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 15, 2025 14:46 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 15, 2025 14:57 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 15, 2025 14:57 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 15, 2025 14:57 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula August 15, 2025 14:57 Inactive
@kumaryash90 kumaryash90 added the merge-queue Adds the pull request to Graphite's merge queue. label Aug 15, 2025
Copy link
Member Author

kumaryash90 commented Aug 15, 2025

Merge activity

@kumaryash90 kumaryash90 added the hotfix This pull request should be prioritized in the merge queue. label Aug 15, 2025
<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on the removal of the `THIRDWEB_PUBLISHER_ADDRESS` constant from the `addresses.ts` file and its associated usage in the `custom-contract.tsx` file, simplifying the logic related to default fee configuration.

### Detailed summary
- Removed the `THIRDWEB_PUBLISHER_ADDRESS` constant from `addresses.ts`.
- Updated `custom-contract.tsx` to eliminate the use of `THIRDWEB_PUBLISHER_ADDRESS`.
- Simplified the `hasInbuiltDefaultFeeConfig` logic by only checking `defaultFeeRecipientFunction`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

* **Bug Fixes**
  * Corrected default platform-fee selection during contract deployment: when a default fee recipient is configured, the updated default fee rate is applied regardless of publisher identity, ensuring consistent platform fees on non–zero-fee chains.
* **Chores**
  * Removed an unused publisher address constant from configuration.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@graphite-app graphite-app bot force-pushed the yash/update-deploy-config-2 branch from 930fe44 to 6f581c8 Compare August 15, 2025 15:06
@vercel vercel bot temporarily deployed to Preview – nebula August 15, 2025 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground August 15, 2025 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui August 15, 2025 15:06 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 August 15, 2025 15:06 Inactive
@graphite-app graphite-app bot merged commit 6f581c8 into main Aug 15, 2025
24 checks passed
@graphite-app graphite-app bot deleted the yash/update-deploy-config-2 branch August 15, 2025 15:14
@graphite-app graphite-app bot removed merge-queue Adds the pull request to Graphite's merge queue. hotfix This pull request should be prioritized in the merge queue. labels Aug 15, 2025
@vercel vercel bot temporarily deployed to Production – nebula August 15, 2025 15:14 Inactive
@vercel vercel bot temporarily deployed to Production – thirdweb_playground August 15, 2025 15:14 Inactive
@vercel vercel bot temporarily deployed to Production – wallet-ui August 15, 2025 15:14 Inactive
@vercel vercel bot temporarily deployed to Production – docs-v2 August 15, 2025 15:14 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants