-
Notifications
You must be signed in to change notification settings - Fork 618
[Docs] Refactor Contract and Tokens docs #7676
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
[Docs] Refactor Contract and Tokens docs #7676
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThis update introduces a new "Tokens" section to the portal app, including a comprehensive documentation page, sidebar, and layout. The contracts documentation is extensively overhauled with new multi-platform guides, a simplified sidebar, and additional pages for deploying contracts, listening to events, and generating extensions. Minor navigation and metadata adjustments are also made. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PortalApp
participant Sidebar
participant DocPage
User->>PortalApp: Navigate to /tokens
PortalApp->>Sidebar: Load tokens/sidebar.tsx
PortalApp->>DocPage: Render tokens/page.mdx with layout
DocPage-->>User: Display tokens documentation with tabs
sequenceDiagram
participant User
participant PortalApp
participant Sidebar
participant ContractsDoc
User->>PortalApp: Navigate to /contracts
PortalApp->>Sidebar: Load contracts/sidebar.tsx
PortalApp->>ContractsDoc: Render contracts/page.mdx with new tabs
ContractsDoc-->>User: Show multi-platform contract guides
Estimated code review effort4 (~90 minutes) Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7676 +/- ##
=======================================
Coverage 56.39% 56.39%
=======================================
Files 908 908
Lines 58244 58244
Branches 4224 4224
=======================================
Hits 32844 32844
Misses 25290 25290
Partials 110 110
🚀 New features to boost your workflow:
|
size-limit report 📦
|
57da761 to
f43a93f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 12
🧹 Nitpick comments (9)
apps/portal/src/app/contracts/generate/page.mdx (1)
8-9: Verify CLI command syntax and add error handling guidance.The CLI command syntax looks correct, but consider adding guidance for common scenarios like network connectivity issues or invalid addresses.
Consider adding an example of error handling or troubleshooting guidance:
+If the command fails, ensure: +- The contract address exists on the specified chain +- You have internet connectivity to fetch contract ABI +- The chain ID is valid (use `npx thirdweb chainlist` to verify)apps/portal/src/app/contracts/events/page.mdx (1)
3-3: Improve sentence structure for better readability.The sentence is quite long and could be broken down for better clarity.
-The recommended way to listen to contract events is to use the [`getContractEvents`](/references/typescript/v5/getContractEvents) function and passing a prepared event with the Solidity event signature and the params. This is type-safe based on the Solidity event signature you define. You can get your desired contract event signature from the solidity code directly. +The recommended way to listen to contract events is to use the [`getContractEvents`](/references/typescript/v5/getContractEvents) function with a prepared event. This approach uses the Solidity event signature and parameters for type-safe event handling. You can obtain the event signature directly from your Solidity contract code.apps/portal/src/app/contracts/extensions/page.tsx (1)
6-85: Consider extracting extension data processing logicWhile the component works correctly, consider extracting the extension data processing logic into a separate function for better maintainability and testability. This would align with the single-responsibility principle mentioned in the coding guidelines.
Consider refactoring like this:
+async function getExtensionData() { + const docs = await fetchTypeScriptDoc(); + const extensions = [ + ...new Set( + docs.functions + ?.filter((f) => { + const [extension] = getCustomTag(f) || []; + return extension === "@extension"; + }) + ?.map((f) => { + const [, extensionName] = getCustomTag(f) || []; + return extensionName; + }) + .filter((item) => item !== undefined) || [], + ), + ]; + return extensions; +} + export default async function ExtensionPage() { - const docs = await fetchTypeScriptDoc(); - const extensions = [ - ...new Set( - docs.functions - ?.filter((f) => { - const [extension] = getCustomTag(f) || []; - return extension === "@extension"; - }) - ?.map((f) => { - const [, extensionName] = getCustomTag(f) || []; - return extensionName; - }) - .filter((item) => item !== undefined) || [], - ), - ]; + const extensions = await getExtensionData();apps/portal/src/app/contracts/deploy/page.mdx (1)
25-39: Add import statement for better code example completenessThe code example should include the necessary imports for
clientandchainto make it more complete and helpful for developers.Consider adding imports:
```ts +import { createThirdwebClient } from "thirdweb"; +import { defineChain } from "thirdweb/chains"; import { deployContract } from "thirdweb/deploys"; +const client = createThirdwebClient({ clientId: "..." }); +const chain = defineChain(1); // or your target chain + const address = await deployContract({ client, chain,apps/portal/src/app/tokens/sidebar.tsx (2)
1-2: Add server-only import for consistencySince this sidebar configuration might be used in server components, consider adding the server-only directive for consistency with other server-side files.
+import "server-only"; import { ZapIcon } from "lucide-react"; import type { SideBar } from "@/components/Layouts/DocLayout";
8-11: Address TODO comments for deprecated linksThe TODO comments indicate that certain link slugs should be deprecated. Consider creating a tracking issue for this technical debt.
Would you like me to create a GitHub issue to track the deprecation of these link slugs (
buildSlug,extensionsSlug,baseContractsSlug)?apps/portal/src/app/contracts/sidebar.tsx (1)
41-55: Clean up or implement TODO commentsThere's a large commented-out TODO section. Either implement these features or remove the comments to keep the code clean.
Consider either:
- Creating GitHub issues for these pending features and removing the comments
- Implementing the features if they're needed soon
- Moving this to a separate tracking document
apps/portal/src/app/contracts/page.mdx (2)
181-186: Fix typo “preapre” → “prepare”Minor but user-facing typo in the TypeScript section.
-You can preapre a write transaction to a contract +You can prepare a write transaction to a contract
195-215: AddprepareContractCallimport in the TypeScript frontend exampleThe snippet calls
prepareContractCallbut never imports it, which will confuse readers copy-pasting the code.-import { sendTransaction } from "thirdweb"; +import { sendTransaction, prepareContractCall } from "thirdweb";(The same omission appears in the React and React Native examples—consider updating those blocks as well.)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (86)
apps/portal/src/app/tokens/assets/test.jpgis excluded by!**/*.jpgapps/portal/src/app/tokens/build/modular-contracts/assets/modular-contracts-analogy.pngis excluded by!**/*.pngapps/portal/src/app/tokens/build/modular-contracts/assets/modular-contracts-flow.pngis excluded by!**/*.pngapps/portal/src/app/tokens/build/overview/assets/extension-model.svgis excluded by!**/*.svgapps/portal/src/app/tokens/build/stylus/assets/stylus-deploy-page.pngis excluded by!**/*.pngapps/portal/src/app/tokens/build/stylus/assets/stylus-publish-page.pngis excluded by!**/*.pngapps/portal/src/app/tokens/deploy/deploy-contract/assets/deploy-cli.pngis excluded by!**/*.pngapps/portal/src/app/tokens/deploy/deploy-contract/assets/deploy-contract.pngis excluded by!**/*.pngapps/portal/src/app/tokens/deploy/deploy-contract/assets/detected-extensions.pngis excluded by!**/*.pngapps/portal/src/app/tokens/deploy/deploy-contract/assets/link-device.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/drop/assets/claim-conditions.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/modular-contracts/assets/modular-contracts-analogy.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/modular-contracts/assets/modular-contracts-flow.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/multiwrap/assets/multiwrap-diagram.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/design-docs/signature-mint/assets/signature-drop-diagram.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/overview/assets/test.jpgis excluded by!**/*.jpgapps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/mint-nft-collection.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/more-settings.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/nft-collection-settings.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/advanced-configuration.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/choose-network.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/contract-metadata.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/delayed-reveal.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/deploy-now.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/funds.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/upload-types.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc20_claimable.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc20_transferable.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_batchmetadata.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_mintable.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_openedition.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_royalty.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_transferable.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step4.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step4.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step4.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step1.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step2.pngis excluded by!**/*.pngapps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step3.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/api-key-name.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/contract-dashboard-modules.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/copy-api-key.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/create-api-key.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/deploying.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/input-owner.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/install-module.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/module-installed.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/proceed.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/publish-contract.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/scroll-and-next.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/select-counter-core.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/select-counter-module.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/sepolia-deploy-now.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/modular-contracts/assets/modular-contracts-analogy.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/modular-contracts/assets/modular-contracts-flow.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/agglayer-module.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/approve-function.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/grant-minter.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/mint-tokens.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/restrict-transfers.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/overview/assets/overview-image.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/contract-metadata.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/deployed-contract.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/erc-20-base.pngis excluded by!**/*.pngapps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/modular-contracts.pngis excluded by!**/*.png
📒 Files selected for processing (11)
apps/portal/src/app/Header.tsx(1 hunks)apps/portal/src/app/contracts/deploy/page.mdx(1 hunks)apps/portal/src/app/contracts/events/page.mdx(1 hunks)apps/portal/src/app/contracts/extensions/page.tsx(1 hunks)apps/portal/src/app/contracts/generate/page.mdx(1 hunks)apps/portal/src/app/contracts/layout.tsx(1 hunks)apps/portal/src/app/contracts/page.mdx(1 hunks)apps/portal/src/app/contracts/sidebar.tsx(1 hunks)apps/portal/src/app/tokens/layout.tsx(1 hunks)apps/portal/src/app/tokens/page.mdx(1 hunks)apps/portal/src/app/tokens/sidebar.tsx(1 hunks)
📓 Path-based instructions (2)
**/*.{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@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless 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/portal/src/app/contracts/layout.tsxapps/portal/src/app/tokens/layout.tsxapps/portal/src/app/contracts/extensions/page.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/tokens/sidebar.tsxapps/portal/src/app/contracts/sidebar.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/portal/src/app/contracts/layout.tsxapps/portal/src/app/tokens/layout.tsxapps/portal/src/app/contracts/extensions/page.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/tokens/sidebar.tsxapps/portal/src/app/contracts/sidebar.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Keep documentation focused on developer experience and practical usage
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: MananTank
PR: thirdweb-dev/js#7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The `projectMeta` prop is not required for the server-rendered `ContractTokensPage` component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
apps/portal/src/app/contracts/layout.tsx (12)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Analytics event name: human-readable <subject> <verb> (e.g., "contract deployed"); function: report<Subject><Verb> (PascalCase)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Event name: human-readable <subject> <verb> phrase (e.g. "contract deployed").
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/tokens/layout.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to 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
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (bg-card), borders (border-border), muted text (text-muted-foreground) etc.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Accept a typed props object and export a named function (export function MyComponent()).
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
apps/portal/src/app/contracts/events/page.mdx (3)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Event name: human-readable <subject> <verb> phrase (e.g. "contract deployed").
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Analytics event name: human-readable <subject> <verb> (e.g., "contract deployed"); function: report<Subject><Verb> (PascalCase)
apps/portal/src/app/contracts/extensions/page.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Composable functions with TypeScript safety in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in src/exports/react.native.ts
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Extensions follow modular pattern in src/extensions/
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx} : Expose className prop on root element of components for overrides
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Server Components (Node edge): Start files with import "server-only";
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.{ts,tsx} : Write idiomatic TypeScript with explicit function declarations and return types
apps/portal/src/app/Header.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use NavLink (@/components/ui/NavLink) for internal navigation so active states are handled automatically.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{ts,tsx} : Redirect logic using redirect() from next/navigation.
Learnt from: jnsdls
PR: #7364
File: apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx:36-41
Timestamp: 2025-06-18T02:13:34.500Z
Learning: In the logout flow in apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx, when doLogout() fails, the cleanup steps (resetAnalytics(), wallet disconnect, router refresh) should NOT execute. This is intentional to maintain consistency - if server-side logout fails, client-side cleanup should not occur.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use Authorization: Bearer header – never embed tokens in URLs
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Keep tokens secret via internal API routes or server actions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard//api//*.{ts,tsx} : Pass the token in the Authorization: Bearer header – never embed it in the URL.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
apps/portal/src/app/contracts/deploy/page.mdx (4)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/shared-analytics-page.tsx:33-39
Timestamp: 2025-05-26T16:30:24.965Z
Learning: In the thirdweb dashboard codebase, redirectToContractLandingPage function already handles execution termination internally (likely using Next.js redirect() which throws an exception), so no explicit return statement is needed after calling it.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via exports/ directory, grouped by feature in the SDK public API
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/contracts/generate/page.mdx (4)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via exports/ directory, grouped by feature in the SDK public API
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Composable functions with TypeScript safety in extensions
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/tokens/page.mdx (6)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from @tanstack/react-query or thirdweb SDKs.
apps/portal/src/app/tokens/sidebar.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Keep tokens secret via internal API routes or server actions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (bg-card), borders (border-border), muted text (text-muted-foreground) etc.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to 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
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
apps/portal/src/app/contracts/page.mdx (9)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from @tanstack/react-query or thirdweb SDKs.
apps/portal/src/app/contracts/sidebar.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard//components//index.ts : Group related components in their own folder and expose a single barrel index.ts where necessary.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.
🪛 LanguageTool
apps/portal/src/app/tokens/page.mdx
[grammar] ~16-~16: Ensure spelling is correct
Context: ...d contracts deployable via dashboard or programatically. - Base implementations to customize and...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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@/typesor localtypes.tsbarrels
Prefer type aliases over interface except for nominal shapes
Avoidanyandunknownunless 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/portal/src/app/contracts/layout.tsxapps/portal/src/app/tokens/layout.tsxapps/portal/src/app/contracts/extensions/page.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/tokens/sidebar.tsxapps/portal/src/app/contracts/sidebar.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/portal/src/app/contracts/layout.tsxapps/portal/src/app/tokens/layout.tsxapps/portal/src/app/contracts/extensions/page.tsxapps/portal/src/app/Header.tsxapps/portal/src/app/tokens/sidebar.tsxapps/portal/src/app/contracts/sidebar.tsx
🧠 Learnings (12)
📓 Common learnings
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Keep documentation focused on developer experience and practical usage
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., `bg-card`, `border-border`, `text-muted-foreground`)
Learnt from: MananTank
PR: thirdweb-dev/js#7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The `projectMeta` prop is not required for the server-rendered `ContractTokensPage` component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
apps/portal/src/app/contracts/layout.tsx (12)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Analytics event name: human-readable <subject> <verb> (e.g., "contract deployed"); function: report<Subject><Verb> (PascalCase)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Event name: human-readable <subject> <verb> phrase (e.g. "contract deployed").
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/tokens/layout.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to 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
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (bg-card), borders (border-border), muted text (text-muted-foreground) etc.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Accept a typed props object and export a named function (export function MyComponent()).
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
apps/portal/src/app/contracts/events/page.mdx (3)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Event name: human-readable <subject> <verb> phrase (e.g. "contract deployed").
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/@/analytics/report.ts : Analytics event name: human-readable <subject> <verb> (e.g., "contract deployed"); function: report<Subject><Verb> (PascalCase)
apps/portal/src/app/contracts/extensions/page.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Composable functions with TypeScript safety in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/exports/react.native.ts : React Native specific exports are in src/exports/react.native.ts
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Extensions follow modular pattern in src/extensions/
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{tsx} : Expose className prop on root element of components for overrides
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Server Components (Node edge): Start files with import "server-only";
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.{ts,tsx} : Write idiomatic TypeScript with explicit function declarations and return types
apps/portal/src/app/Header.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Use NavLink (@/components/ui/NavLink) for internal navigation so active states are handled automatically.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{ts,tsx} : Redirect logic using redirect() from next/navigation.
Learnt from: jnsdls
PR: #7364
File: apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx:36-41
Timestamp: 2025-06-18T02:13:34.500Z
Learning: In the logout flow in apps/dashboard/src/app/(app)/account/components/AccountHeader.tsx, when doLogout() fails, the cleanup steps (resetAnalytics(), wallet disconnect, router refresh) should NOT execute. This is intentional to maintain consistency - if server-side logout fails, client-side cleanup should not occur.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use Authorization: Bearer header – never embed tokens in URLs
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Keep tokens secret via internal API routes or server actions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard//api//*.{ts,tsx} : Pass the token in the Authorization: Bearer header – never embed it in the URL.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
apps/portal/src/app/contracts/deploy/page.mdx (4)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/analytics/shared-analytics-page.tsx:33-39
Timestamp: 2025-05-26T16:30:24.965Z
Learning: In the thirdweb dashboard codebase, redirectToContractLandingPage function already handles execution termination internally (likely using Next.js redirect() which throws an exception), so no explicit return statement is needed after calling it.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via exports/ directory, grouped by feature in the SDK public API
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/contracts/generate/page.mdx (4)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Export everything via exports/ directory, grouped by feature in the SDK public API
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Composable functions with TypeScript safety in extensions
Learnt from: MananTank
PR: #7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:82-90
Timestamp: 2025-06-13T13:03:41.732Z
Learning: The thirdweb contract object is serializable and can safely be used in contexts (e.g., React-Query keys) that require serializable values.
apps/portal/src/app/tokens/page.mdx (6)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to packages/thirdweb/src/exports/** : Every public symbol must have comprehensive TSDoc with at least one @example block that compiles and custom annotation tags (@beta, @internal, @experimental)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from @tanstack/react-query or thirdweb SDKs.
apps/portal/src/app/tokens/sidebar.tsx (12)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use design system tokens (e.g., bg-card, border-border, text-muted-foreground)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Keep tokens secret via internal API routes or server actions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Prefer API routes or server actions to keep tokens secret; the browser only sees relative paths.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Stick to design-tokens: background (bg-card), borders (border-border), muted text (text-muted-foreground) etc.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : For notices & skeletons rely on AnnouncementBanner, GenericLoadingPage, EmptyStateCard.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to 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
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
apps/portal/src/app/contracts/page.mdx (9)
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/tokens/shared-page.tsx:41-48
Timestamp: 2025-05-26T16:28:50.772Z
Learning: The projectMeta prop is not required for the server-rendered ContractTokensPage component in the tokens shared page, unlike some other shared pages where it's needed for consistency.
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: jnsdls
PR: #7188
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx:15-15
Timestamp: 2025-05-29T00:46:09.063Z
Learning: In the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/accounts/components/accounts-count.tsx, the 3-column grid layout (md:grid-cols-3) is intentionally maintained even when rendering only one StatCard, as part of the design structure for this component.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Interactive UI that relies on hooks (useState, useEffect, React Query, wallet hooks).
Learnt from: MananTank
PR: #7177
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/erc20/erc20.tsx:15-17
Timestamp: 2025-05-27T19:54:55.885Z
Learning: The fetchDashboardContractMetadata function from "@3rdweb-sdk/react/hooks/useDashboardContractMetadata" has internal error handlers for all promises and cannot throw errors, so external error handling is not needed when calling this function.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from @tanstack/react-query or thirdweb SDKs.
apps/portal/src/app/contracts/sidebar.tsx (11)
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Layouts should reuse SidebarLayout / FullWidthSidebarLayout (@/components/blocks/SidebarLayout).
Learnt from: MananTank
PR: #7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:155-160
Timestamp: 2025-06-10T00:46:58.580Z
Learning: In the dashboard application, the route structure for team and project navigation is /team/[team_slug]/[project_slug]/... without a /project/ segment. Contract links should be formatted as /team/${teamSlug}/${projectSlug}/contract/${chainId}/${contractAddress}.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Use NavLink for internal navigation with automatic active states in dashboard and playground apps
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to src/extensions/** : Auto-generated contracts from ABI definitions in extensions
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Prefer composable primitives over custom markup: Button, Input, Select, Tabs, Card, Sidebar, Separator, Badge.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard//components//index.ts : Group related components in their own folder and expose a single barrel index.ts where necessary.
Learnt from: MananTank
PR: #7152
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/(marketplace)/direct-listings/shared-direct-listings-page.tsx:47-52
Timestamp: 2025-05-26T16:29:54.317Z
Learning: The projectMeta prop is not required for the server-rendered ContractDirectListingsPage component in the direct listings shared page, following the same pattern as other server components in the codebase where projectMeta is only needed for client components.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/layout.tsx : Building layout shells (layout.tsx) and top-level pages that mainly assemble data.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Surface breaking changes prominently in PR descriptions
Learnt from: MananTank
PR: #7434
File: apps/dashboard/src/app/(app)/team///contract/[chain]/[contractAddress]/components/project-selector.tsx:62-76
Timestamp: 2025-06-24T21:38:03.155Z
Learning: In the project-selector.tsx component for contract imports, the addToProject.mutate() call is intentionally not awaited (fire-and-forget pattern) to allow immediate navigation to the contract page while the import happens in the background. This is a deliberate design choice to prioritize user experience.
Learnt from: CR
PR: thirdweb-dev/js#0
File: .cursor/rules/dashboard.mdc:0-0
Timestamp: 2025-07-18T19:20:32.530Z
Learning: Applies to dashboard/**/*.{tsx,jsx} : Icons come from lucide-react or the project-specific …/icons exports – never embed raw SVG.
🪛 LanguageTool
apps/portal/src/app/tokens/page.mdx
[grammar] ~16-~16: Ensure spelling is correct
Context: ...d contracts deployable via dashboard or programatically. - Base implementations to customize and...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
⏰ 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). (2)
- GitHub Check: Size
- GitHub Check: Analyze (javascript)
🔇 Additional comments (8)
apps/portal/src/app/contracts/generate/page.mdx (1)
29-29: Verify MDX absolute import resolutionFiles to inspect:
- apps/portal/src/app/contracts/generate/page.mdx (line 29)
- apps/portal/src/app/typescript/v5/extensions/generate/page.mdx
- apps/portal/src/app/cli/generate/page.mdx
Please confirm the following:
- Your apps/portal/tsconfig.json defines a
"baseUrl"(e.g.".") and a"paths"entry covering the"/thirdweb/*"specifier (or adjust to"thirdweb/*"if you intend to drop the leading slash).- The MDX/Next.js bundler plugin in use correctly resolves imports starting with
"/thirdweb/…"at build time.- If TypeScript or webpack cannot resolve these absolute paths, update the imports to remove the leading slash:
- import { permit } from "/thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85"; + import { permit } from "thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85";apps/portal/src/app/Header.tsx (1)
51-53: Navigation update aligns with new tokens section.The replacement of insight and vault links with the tokens link correctly reflects the new documentation structure introduced in this PR.
apps/portal/src/app/contracts/layout.tsx (2)
15-15: Updated description accurately reflects new documentation focus.The description change from "create, deploy, and manage" to "read, write, deploy, and listen to contract events" accurately captures the expanded scope of the refactored documentation.
18-20: Simplified titles improve clarity.The title simplification from "thirdweb contracts/Contracts" to just "Contracts" improves readability while maintaining clear identification.
apps/portal/src/app/contracts/extensions/page.tsx (1)
1-4: Addimport "server-only"directive for server componentAccording to the coding guidelines, server components should start with
import "server-only";. This async component runs on the server and should include this directive.Add the server-only import at the beginning:
+import "server-only"; import { fetchTypeScriptDoc } from "@/app/references/components/TDoc/fetchDocs/fetchTypeScriptDoc"; import { getCustomTag } from "@/app/references/components/TDoc/utils/getSidebarLinkgroups";⛔ Skipped due to learnings
Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Server Components (Node edge): Start files with `import "server-only";`Learnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Prefix files with `import "server-only";` so they never end up in the client bundle.Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to **/*.{ts,tsx} : Write idiomatic TypeScript with explicit function declarations and return typesLearnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to **/*.{ts,tsx} : Limit each file to one stateless, single-responsibility function for clarityLearnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Client Components (browser): Begin files with `'use client';`Learnt from: jnsdls PR: thirdweb-dev/js#6929 File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx:14-19 Timestamp: 2025-05-21T05:17:31.283Z Learning: In Next.js server components, the `params` object can sometimes be a Promise that needs to be awaited, despite type annotations suggesting otherwise. In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/insight/webhooks/page.tsx, it's necessary to await the params object before accessing its properties.Learnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/*.{tsx,jsx} : Keep components pure; fetch data outside (server component or hook) and pass it down via props.Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to **/*.{ts,tsx} : Comment only ambiguous logic; avoid restating TypeScript in proseLearnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/api/**/*.{ts,tsx} : Co-locate data helpers under `@/api/**` and mark them with "server-only".Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to src/extensions/** : Composable functions with TypeScript safety in extensionsLearnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : Import UI primitives from `@/components/ui/*` (Button, Input, Select, Tabs, Card, Sidebar, Badge, Separator) in dashboard and playground appsLearnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/layout.tsx : Building layout shells (`layout.tsx`) and top-level pages that mainly assemble data.Learnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/*.{tsx,jsx} : Local state or effects live inside; data fetching happens in hooks.Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to packages/thirdweb/src/exports/** : Every public symbol must have comprehensive TSDoc with at least one `@example` block that compiles and custom annotation tags (`@beta`, `@internal`, `@experimental`)Learnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to **/*.{ts,tsx} : Re-use shared types from `@/types` or local `types.ts` barrelsLearnt from: CR PR: thirdweb-dev/js#0 File: CLAUDE.md:0-0 Timestamp: 2025-07-18T19:19:55.613Z Learning: Applies to src/exports/react.native.ts : React Native specific exports are in `src/exports/react.native.ts`Learnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/*client.tsx : Anything that consumes hooks from `@tanstack/react-query` or thirdweb SDKs.Learnt from: CR PR: thirdweb-dev/js#0 File: .cursor/rules/dashboard.mdc:0-0 Timestamp: 2025-07-18T19:20:32.530Z Learning: Applies to dashboard/**/*.{ts,tsx} : Heavy data fetching that should not ship to the client (e.g. analytics, billing).apps/portal/src/app/tokens/page.mdx (1)
154-170: Excellent documentation with clear code examplesThe override example with detailed comments explaining the
_canMintfunction is particularly helpful. The explanation of how the Permissions extension works with role-based access control is clear and educational.apps/portal/src/app/contracts/sidebar.tsx (1)
74-76: Confirm React Native reference URLIt looks like the React Native menu item is using the exact same href as React (the TypeScript hooks reference). Please verify whether a dedicated React Native documentation page exists (for example something under
/references/react-native/...) and, if so, update thehref. Otherwise, confirm that pointing to the TypeScript hooks docs is intentional.• File:
apps/portal/src/app/contracts/sidebar.tsx
Lines: 74–76href: "/references/typescript/v5/hooks#transactions", // same as React icon: <ReactIcon />, name: "React Native",apps/portal/src/app/contracts/page.mdx (1)
223-246: Clarify Engine import & enqueue example
Engineis imported from"thirdweb"but the public API exports it from"thirdweb/engine".
Additionally, the comment says enqueue but the sample immediately sends after mutation. Consider:-import { Engine } from "thirdweb"; +import { Engine } from "thirdweb/engine";and renaming variables / comments for consistency.
| @@ -0,0 +1,57 @@ | |||
| # Deploy Contracts | |||
|
|
|||
| You can deploy contracts via CLI or programatically. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo: "programatically" → "programmatically"
There's a spelling error in the word "programatically".
-You can deploy contracts via CLI or programatically.
+You can deploy contracts via CLI or programmatically.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| You can deploy contracts via CLI or programatically. | |
| You can deploy contracts via CLI or programmatically. |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/deploy/page.mdx at line 3, correct the typo
"programatically" to "programmatically" to fix the spelling error.
| const myEvent = prepareEvent({ | ||
| signature: "event Transfer(address indexed from, address indexed to, uint256 value)", | ||
| }); | ||
|
|
||
| const events = await getContractEvents({ | ||
| contract: myContract, | ||
| events: [myEvent], | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add missing contract definition in code example.
The example uses myContract without defining it, which could confuse readers.
import { getContractEvents, prepareEvent } from "thirdweb";
+import { getContract } from "thirdweb";
+import { ethereum } from "thirdweb/chains";
+
+const myContract = getContract({
+ client,
+ chain: ethereum,
+ address: "0x...", // your contract address
+});
const myEvent = prepareEvent({
signature: "event Transfer(address indexed from, address indexed to, uint256 value)",
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const myEvent = prepareEvent({ | |
| signature: "event Transfer(address indexed from, address indexed to, uint256 value)", | |
| }); | |
| const events = await getContractEvents({ | |
| contract: myContract, | |
| events: [myEvent], | |
| }); | |
| ``` | |
| import { getContractEvents, prepareEvent } from "thirdweb"; | |
| import { getContract } from "thirdweb"; | |
| import { ethereum } from "thirdweb/chains"; | |
| const myContract = getContract({ | |
| client, | |
| chain: ethereum, | |
| address: "0x...", // your contract address | |
| }); | |
| const myEvent = prepareEvent({ | |
| signature: "event Transfer(address indexed from, address indexed to, uint256 value)", | |
| }); | |
| const events = await getContractEvents({ | |
| contract: myContract, | |
| events: [myEvent], | |
| }); |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/events/page.mdx around lines 8 to 16, the code
example uses the variable myContract without defining it, which can confuse
readers. Add a definition or initialization of myContract before it is used in
getContractEvents, ensuring it is clear what myContract represents and how it is
obtained or created.
| const events = await getContractEvents({ | ||
| contract: myContract, | ||
| events: [transferEvent()], | ||
| }); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add missing contract definition for consistency.
Similar to the previous example, myContract is used without definition.
import { getContractEvents } from "thirdweb";
import { transferEvent } from "thirdweb/extensions/erc20";
+import { getContract } from "thirdweb";
+import { ethereum } from "thirdweb/chains";
+
+const myContract = getContract({
+ client,
+ chain: ethereum,
+ address: "0x...", // your ERC20 contract address
+});
const events = await getContractEvents({
contract: myContract,
events: [transferEvent()],
});Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/events/page.mdx around lines 26 to 30, the
variable myContract is used without being defined, causing inconsistency and
potential errors. Define myContract before its usage by importing or
initializing it appropriately, ensuring it matches the contract setup used in
previous examples for consistency.
| npx thirdweb generate <contractId>/<contractAddress> | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLI command parameter format needs clarification.
The command uses <contractId>/<contractAddress> but the parameter should likely be <chainId>/<contractAddress> based on the generate page example.
-npx thirdweb generate <contractId>/<contractAddress>
+npx thirdweb generate <chainId>/<contractAddress>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| npx thirdweb generate <contractId>/<contractAddress> | |
| ``` | |
| npx thirdweb generate <chainId>/<contractAddress> |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/events/page.mdx around lines 37 to 38, the CLI
command parameter is incorrectly labeled as <contractId>/<contractAddress>.
Update the parameter to <chainId>/<contractAddress> to match the correct format
shown in the generate page example, ensuring clarity and consistency in the
documentation.
| const contract = getContract({ | ||
| client, | ||
| chain: optimism, | ||
| address: USDC_ADDRESS, | ||
| }); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add missing imports in code example.
The code example uses getContract, optimism, and USDC_ADDRESS without showing their imports, which could confuse developers.
+import { getContract } from "thirdweb";
+import { optimism } from "thirdweb/chains";
import { permit } from "/thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85";
+const USDC_ADDRESS = "0x0b2c639c533813f4aa9d7837caf62653d097ff85";
+
const contract = getContract({
client,
chain: optimism,
address: USDC_ADDRESS,
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| const contract = getContract({ | |
| client, | |
| chain: optimism, | |
| address: USDC_ADDRESS, | |
| }); | |
| import { getContract } from "thirdweb"; | |
| import { optimism } from "thirdweb/chains"; | |
| import { permit } from "/thirdweb/10/0x0b2c639c533813f4aa9d7837caf62653d097ff85"; | |
| const USDC_ADDRESS = "0x0b2c639c533813f4aa9d7837caf62653d097ff85"; | |
| const contract = getContract({ | |
| client, | |
| chain: optimism, | |
| address: USDC_ADDRESS, | |
| }); |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/generate/page.mdx around lines 31 to 36, the
code example uses getContract, optimism, and USDC_ADDRESS without importing
them. Add the appropriate import statements for getContract, optimism, and
USDC_ADDRESS at the top of the code example to clarify their origins and avoid
confusion for developers.
| import { | ||
| Callout, | ||
| OpenSourceCard, | ||
| createMetadata, | ||
| InstallTabs, | ||
| SDKCard, | ||
| Grid, | ||
| ArticleIconCard, | ||
| Tabs, | ||
| TabsList, | ||
| TabsTrigger, | ||
| TabsContent, | ||
| } from "@doc"; | ||
| import { | ||
| ReactIcon, | ||
| TypeScriptIcon, | ||
| UnityIcon, | ||
| DotNetIcon, | ||
| UnrealEngineIcon, | ||
| EngineIcon, | ||
| } from "@/icons"; | ||
| import { ExternalLink } from "lucide-react"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused imports to avoid MDX / TS build errors
OpenSourceCard, ArticleIconCard, and ExternalLink are imported but never referenced in this page.
Next.js/MDX builds treat these as TypeScript modules; the presence of unused symbols will trigger no-unused-vars / TS errors.
-import {
- Callout,
- OpenSourceCard,
- createMetadata,
- InstallTabs,
- SDKCard,
- Grid,
- ArticleIconCard,
- Tabs,
- TabsList,
- TabsTrigger,
- TabsContent,
-} from "@doc";
+import {
+ Callout,
+ createMetadata,
+ InstallTabs,
+ SDKCard,
+ Grid,
+ Tabs,
+ TabsList,
+ TabsTrigger,
+ TabsContent,
+} from "@doc";
...
-import { ExternalLink } from "lucide-react";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { | |
| Callout, | |
| OpenSourceCard, | |
| createMetadata, | |
| InstallTabs, | |
| SDKCard, | |
| Grid, | |
| ArticleIconCard, | |
| Tabs, | |
| TabsList, | |
| TabsTrigger, | |
| TabsContent, | |
| } from "@doc"; | |
| import { | |
| ReactIcon, | |
| TypeScriptIcon, | |
| UnityIcon, | |
| DotNetIcon, | |
| UnrealEngineIcon, | |
| EngineIcon, | |
| } from "@/icons"; | |
| import { ExternalLink } from "lucide-react"; | |
| import { | |
| Callout, | |
| createMetadata, | |
| InstallTabs, | |
| SDKCard, | |
| Grid, | |
| Tabs, | |
| TabsList, | |
| TabsTrigger, | |
| TabsContent, | |
| } from "@doc"; | |
| import { | |
| ReactIcon, | |
| TypeScriptIcon, | |
| UnityIcon, | |
| DotNetIcon, | |
| UnrealEngineIcon, | |
| EngineIcon, | |
| } from "@/icons"; |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/page.mdx lines 1 to 22, remove the unused
imports OpenSourceCard, ArticleIconCard, and ExternalLink from the import
statements to prevent TypeScript no-unused-vars errors during the MDX build.
Only keep imports that are actually used in the file.
| using Thirdweb; | ||
|
|
||
| // For client-side applications: | ||
| var sdk = new ThirdwebSDK("ethereum", new ThirdwebSDK.Options | ||
| { | ||
| ClientId = "YOUR_CLIENT_ID" // From thirdweb dashboard | ||
| }); | ||
|
|
||
| // For server-side applications: | ||
| // var sdk = new ThirdwebSDK("ethereum", new ThirdwebSDK.Options | ||
| // { | ||
| // SecretKey = Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY") | ||
| // }); | ||
| ``` | ||
|
|
||
| ### Read a Contract | ||
|
|
||
| You can read contract data using the [`ThirdwebContract.Read`](/dotnet/contracts/read) method. | ||
|
|
||
| ```csharp | ||
| BigInteger chainId = 1; // Ethereum mainnet | ||
| string contractAddress = "0x..."; // Your contract address | ||
| var contract = await ThirdwebContract.Create(client, contractAddress, chainId); | ||
|
|
||
| var data = await contract.Read(wallet, contract, "allowance", ownerAddress, spenderAddress); | ||
| Console.WriteLine($"Contract data: {data}"); | ||
| ``` | ||
|
|
||
| ### Write to a Contract | ||
|
|
||
| ```csharp | ||
| BigInteger chainId = 1; // Ethereum mainnet | ||
| string contractAddress = "0x..."; // Your contract address | ||
| var contract = await ThirdwebContract.Create(client, contractAddress, chainId); | ||
|
|
||
| // The wallet that signs and sends the transaction | ||
| var wallet = await PrivateKeyWallet.Create(client, "yourPrivateKeyHex"); | ||
|
|
||
| // Assuming transfer takes an address and an amount as parameters | ||
| string toAddress = "0x..."; | ||
| BigInteger amount = new BigInteger(1000); // The amount to transfer | ||
| // No ether is being sent in this non-payable transaction, so weiValue is 0 | ||
| BigInteger weiValue = BigInteger.Zero; | ||
|
|
||
| // Executing the transfer | ||
| var receipt = await contract.Write(wallet, contract, "transfer", weiValue, toAddress, amount); | ||
| Console.WriteLine($"Transaction receipt: {receipt}"); | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect variable names in .NET snippet break compile
ThirdwebContract.Create(client, …) uses client, but the variable defined earlier is sdk. Same mismatch for PrivateKeyWallet.Create.
-var contract = await ThirdwebContract.Create(client, contractAddress, chainId);
+var contract = await ThirdwebContract.Create(sdk, contractAddress, chainId);
...
-var wallet = await PrivateKeyWallet.Create(client, "yourPrivateKeyHex");
+var wallet = await PrivateKeyWallet.Create(sdk, "yourPrivateKeyHex");📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ```csharp | |
| using Thirdweb; | |
| // For client-side applications: | |
| var sdk = new ThirdwebSDK("ethereum", new ThirdwebSDK.Options | |
| { | |
| ClientId = "YOUR_CLIENT_ID" // From thirdweb dashboard | |
| }); | |
| // For server-side applications: | |
| // var sdk = new ThirdwebSDK("ethereum", new ThirdwebSDK.Options | |
| // { | |
| // SecretKey = Environment.GetEnvironmentVariable("THIRDWEB_SECRET_KEY") | |
| // }); | |
| ``` | |
| ### Read a Contract | |
| You can read contract data using the [`ThirdwebContract.Read`](/dotnet/contracts/read) method. | |
| ```csharp | |
| BigInteger chainId = 1; // Ethereum mainnet | |
| string contractAddress = "0x..."; // Your contract address | |
| var contract = await ThirdwebContract.Create(client, contractAddress, chainId); | |
| var data = await contract.Read(wallet, contract, "allowance", ownerAddress, spenderAddress); | |
| Console.WriteLine($"Contract data: {data}"); | |
| ``` | |
| ### Write to a Contract | |
| ```csharp | |
| BigInteger chainId = 1; // Ethereum mainnet | |
| string contractAddress = "0x..."; // Your contract address | |
| var contract = await ThirdwebContract.Create(client, contractAddress, chainId); | |
| // The wallet that signs and sends the transaction | |
| var wallet = await PrivateKeyWallet.Create(client, "yourPrivateKeyHex"); | |
| // Assuming transfer takes an address and an amount as parameters | |
| string toAddress = "0x..."; | |
| BigInteger amount = new BigInteger(1000); // The amount to transfer | |
| // No ether is being sent in this non-payable transaction, so weiValue is 0 | |
| BigInteger weiValue = BigInteger.Zero; | |
| // Executing the transfer | |
| var receipt = await contract.Write(wallet, contract, "transfer", weiValue, toAddress, amount); | |
| Console.WriteLine($"Transaction receipt: {receipt}"); |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/page.mdx between lines 608 and 656, the .NET
code snippets use the variable name 'client' when calling
ThirdwebContract.Create and PrivateKeyWallet.Create, but the SDK instance is
actually named 'sdk'. To fix this, replace all occurrences of 'client' with
'sdk' in these snippets to ensure the variable names are consistent and the code
compiles correctly.
| - [Contract Events](/contracts/read) | ||
|
|
||
| ## Explore Full API References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Broken link to Contract Events page
The slug /contracts/read no longer exists after the docs restructure; the events guide lives at /contracts/events.
-- [Contract Events](/contracts/read)
+- [Contract Events](/contracts/events)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [Deploy Contracts](/contracts/deploy) | |
| - [Contract Events](/contracts/read) | |
| - [Deploy Contracts](/contracts/deploy) | |
| - [Contract Events](/contracts/events) |
🤖 Prompt for AI Agents
In apps/portal/src/app/contracts/page.mdx around lines 683 to 685, the link to
the Contract Events page uses the outdated slug `/contracts/read`. Update the
link to point to the new correct slug `/contracts/events` to fix the broken
link.
| description: | ||
| "Easily create, deploy, and manage smart contracts on any EVM compatible blockchain", | ||
| image: { | ||
| icon: "contract", | ||
| title: "thirdweb contracts", | ||
| }, | ||
| title: "thirdweb Contracts", | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent metadata with contracts focus.
The metadata describes "smart contracts" and uses contract-related icons/titles, but this is the tokens layout. The description and image metadata should reflect token-specific functionality.
export const metadata = createMetadata({
description:
- "Easily create, deploy, and manage smart contracts on any EVM compatible blockchain",
+ "Easily create, deploy, and manage tokens on any EVM compatible blockchain",
image: {
- icon: "contract",
- title: "thirdweb contracts",
+ icon: "token", // or appropriate token icon
+ title: "thirdweb tokens",
},
- title: "thirdweb Contracts",
+ title: "thirdweb Tokens",
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| description: | |
| "Easily create, deploy, and manage smart contracts on any EVM compatible blockchain", | |
| image: { | |
| icon: "contract", | |
| title: "thirdweb contracts", | |
| }, | |
| title: "thirdweb Contracts", | |
| }); | |
| export const metadata = createMetadata({ | |
| description: | |
| "Easily create, deploy, and manage tokens on any EVM compatible blockchain", | |
| image: { | |
| icon: "token", // or appropriate token icon | |
| title: "thirdweb tokens", | |
| }, | |
| title: "thirdweb Tokens", | |
| }); |
🤖 Prompt for AI Agents
In apps/portal/src/app/tokens/layout.tsx around lines 14 to 21, the metadata
currently describes smart contracts and uses contract-related icons and titles,
which is inconsistent for the tokens layout. Update the description to focus on
token-specific functionality, and change the image icon and title to reflect
tokens instead of contracts, ensuring the metadata accurately represents the
tokens context.
|
|
||
| Deploy and manage tokens on any EVM compatible blockchain, thirdweb offers: | ||
|
|
||
| - Prebuilt audited contracts deployable via dashboard or programatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo: "programatically" → "programmatically"
Static analysis correctly identified a spelling error.
-- Prebuilt audited contracts deployable via dashboard or programatically.
+- Prebuilt audited contracts deployable via dashboard or programmatically.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Prebuilt audited contracts deployable via dashboard or programatically. | |
| Prebuilt audited contracts deployable via dashboard or programmatically. |
🧰 Tools
🪛 LanguageTool
[grammar] ~16-~16: Ensure spelling is correct
Context: ...d contracts deployable via dashboard or programatically. - Base implementations to customize and...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents
In apps/portal/src/app/tokens/page.mdx at line 16, correct the spelling of
"programatically" to "programmatically" to fix the typo identified by static
analysis.

PR-Codex overview
This PR primarily focuses on updating and enhancing the documentation for smart contracts within the
thirdwebecosystem. It includes improvements to guides, examples, and sidebar navigation for better user experience.Detailed summary
Summary by CodeRabbit
New Features
Documentation
Refactor