Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jul 22, 2025


PR-Codex overview

This PR primarily focuses on updating and enhancing the documentation for smart contracts within the thirdweb ecosystem. It includes improvements to guides, examples, and sidebar navigation for better user experience.

Detailed summary

  • Updated metadata and titles for clarity.
  • Enhanced documentation on deploying contracts via CLI and SDK.
  • Added examples for listening to events and generating extensions.
  • Improved sidebar navigation structure for contracts and tokens.
  • Included new guides for modular contracts and extensions.
  • Added images and diagrams to support documentation.

The following files were skipped due to too many changes: apps/portal/src/app/contracts/page.mdx

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

Summary by CodeRabbit

  • New Features

    • Introduced a comprehensive "Tokens" section with a new sidebar, layout, and detailed documentation for deploying and customizing tokens using thirdweb’s Solidity SDK.
    • Added new documentation pages covering deploying contracts, listening to contract events, and generating contract extensions.
    • Launched an "Extensions" page that lists and describes built-in SDK extensions.
  • Documentation

    • Completely overhauled the contracts documentation with a multi-platform, tabbed developer guide featuring detailed code samples for various SDKs and languages.
    • Simplified and restructured the contracts sidebar for easier navigation.
    • Updated metadata and descriptions for improved clarity and SEO across contracts and tokens sections.
  • Refactor

    • Streamlined navigation links in the header, replacing "Insight" and "Vault" with a unified "Tokens" link.

@vercel
Copy link

vercel bot commented Jul 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 22, 2025 2:54am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
nebula ⬜️ Skipped (Inspect) Jul 22, 2025 2:54am
thirdweb_playground ⬜️ Skipped (Inspect) Jul 22, 2025 2:54am
thirdweb-www ⬜️ Skipped (Inspect) Jul 22, 2025 2:54am
wallet-ui ⬜️ Skipped (Inspect) Jul 22, 2025 2:54am

@vercel vercel bot temporarily deployed to Preview – wallet-ui July 22, 2025 02:37 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 22, 2025 02:37 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 22, 2025 02:37 Inactive
@vercel vercel bot temporarily deployed to Preview – nebula July 22, 2025 02:37 Inactive
@changeset-bot
Copy link

changeset-bot bot commented Jul 22, 2025

⚠️ No Changeset found

Latest commit: f43a93f

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

This PR includes no changesets

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

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

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 22, 2025

Walkthrough

This 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

File(s) Change Summary
apps/portal/src/app/Header.tsx Updated navigation links: replaced "Insight" and "Vault" with "Tokens".
apps/portal/src/app/contracts/deploy/page.mdx
apps/portal/src/app/contracts/events/page.mdx
apps/portal/src/app/contracts/generate/page.mdx
Added new documentation pages for deploying contracts, listening to events, and generating extensions.
apps/portal/src/app/contracts/extensions/page.tsx Added new async React page component to display SDK extensions.
apps/portal/src/app/contracts/layout.tsx Updated contracts layout metadata (description and titles).
apps/portal/src/app/contracts/page.mdx Completely rewrote contracts documentation with multi-SDK/platform tabs, new guides, and code samples.
apps/portal/src/app/contracts/sidebar.tsx Simplified and flattened contracts sidebar structure; updated icons and removed deep nesting.
apps/portal/src/app/tokens/layout.tsx Added new layout component and metadata for the Tokens section.
apps/portal/src/app/tokens/page.mdx Added comprehensive "Tokens" documentation page with tabs for pre-built and custom contract workflows, code samples, and metadata.
apps/portal/src/app/tokens/sidebar.tsx Added detailed sidebar configuration for Tokens section, with categorized and nested links for token standards and contract types.

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
Loading
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
Loading

Estimated code review effort

4 (~90 minutes)

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • TEAM-0000: Entity not found: Issue - Could not find referenced Issue.
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

CodeRabbit Configuration File (.coderabbit.yaml)

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

Documentation and Community

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

@github-actions github-actions bot added the Portal Involves changes to the Portal (docs) codebase. label Jul 22, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

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

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

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

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

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

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Jul 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.39%. Comparing base (1e8190a) to head (f43a93f).
Report is 3 commits behind head on main.

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           
Flag Coverage Δ
packages 56.39% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joaquim-verges joaquim-verges changed the title Replace "Insight" and "Vault" with "Tokens" in header navigation [Docs] Refactor Contract and Tokens docs Jul 22, 2025
@joaquim-verges joaquim-verges marked this pull request as ready for review July 22, 2025 02:40
@joaquim-verges joaquim-verges requested review from a team as code owners July 22, 2025 02:40
@github-actions
Copy link
Contributor

github-actions bot commented Jul 22, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 63.23 KB (0%) 1.3 s (0%) 334 ms (+105.69% 🔺) 1.6 s
thirdweb (cjs) 353.45 KB (0%) 7.1 s (0%) 1.3 s (+0.08% 🔺) 8.3 s
thirdweb (minimal + tree-shaking) 5.7 KB (0%) 114 ms (0%) 85 ms (+708.04% 🔺) 199 ms
thirdweb/chains (tree-shaking) 526 B (0%) 11 ms (0%) 45 ms (+781.34% 🔺) 55 ms
thirdweb/react (minimal + tree-shaking) 19.59 KB (0%) 392 ms (0%) 110 ms (+358.83% 🔺) 502 ms

@joaquim-verges joaquim-verges force-pushed the Replace_Insight_and_Vault_with_Tokens_in_header_navigation branch from 57da761 to f43a93f Compare July 22, 2025 02:44
@vercel vercel bot temporarily deployed to Preview – nebula July 22, 2025 02:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www July 22, 2025 02:44 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui July 22, 2025 02:44 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground July 22, 2025 02:44 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 logic

While 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 completeness

The code example should include the necessary imports for client and chain to 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 consistency

Since 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 links

The 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 comments

There's a large commented-out TODO section. Either implement these features or remove the comments to keep the code clean.

Consider either:

  1. Creating GitHub issues for these pending features and removing the comments
  2. Implementing the features if they're needed soon
  3. 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: Add prepareContractCall import in the TypeScript frontend example

The snippet calls prepareContractCall but 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1e8190a and f43a93f.

⛔ Files ignored due to path filters (86)
  • apps/portal/src/app/tokens/assets/test.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/tokens/build/modular-contracts/assets/modular-contracts-analogy.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/build/modular-contracts/assets/modular-contracts-flow.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/build/overview/assets/extension-model.svg is excluded by !**/*.svg
  • apps/portal/src/app/tokens/build/stylus/assets/stylus-deploy-page.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/build/stylus/assets/stylus-publish-page.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/deploy/deploy-contract/assets/deploy-cli.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/deploy/deploy-contract/assets/deploy-contract.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/deploy/deploy-contract/assets/detected-extensions.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/deploy/deploy-contract/assets/link-device.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/drop/assets/claim-conditions.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/modular-contracts/assets/modular-contracts-analogy.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/modular-contracts/assets/modular-contracts-flow.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/multiwrap/assets/multiwrap-diagram.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/pack/assets/pack-diagram-3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/design-docs/signature-mint/assets/signature-drop-diagram.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/overview/assets/test.jpg is excluded by !**/*.jpg
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/mint-nft-collection.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/more-settings.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-collection/assets/nft-collection-settings.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/advanced-configuration.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/choose-network.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/contract-metadata.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/delayed-reveal.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/deploy-now.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/funds.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-contracts/nft-drop/assets/upload-types.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc20_claimable.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc20_transferable.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_batchmetadata.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_mintable.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_openedition.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_royalty.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/assets/erc721_transferable.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition-drop/assets/edition_drop_step4.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/edition/assets/edition_step4.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-collection/assets/nft_collection_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/nft-drop/assets/nft_drop_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/open-edition/assets/oe_step4.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token-drop/assets/token_drop_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step1.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step2.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/explore/pre-built-modular/token/assets/token_step3.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/api-key-name.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/contract-dashboard-modules.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/copy-api-key.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/create-api-key.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/deploying.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/input-owner.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/install-module.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/module-installed.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/proceed.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/publish-contract.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/scroll-and-next.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/select-counter-core.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/select-counter-module.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/get-started/deploy-modular-contract/assets/sepolia-deploy-now.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/modular-contracts/assets/modular-contracts-analogy.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/modular-contracts/assets/modular-contracts-flow.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/agglayer-module.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/approve-function.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/grant-minter.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/mint-tokens.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/module-contracts/cross-chain/agglayer/assets/restrict-transfers.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/overview/assets/overview-image.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/contract-metadata.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/deployed-contract.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/erc-20-base.png is excluded by !**/*.png
  • apps/portal/src/app/tokens/modular-contracts/tutorials/deploy-erc20-core/assets/modular-contracts.png is 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 @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • apps/portal/src/app/contracts/layout.tsx
  • apps/portal/src/app/tokens/layout.tsx
  • apps/portal/src/app/contracts/extensions/page.tsx
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/tokens/sidebar.tsx
  • apps/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.tsx
  • apps/portal/src/app/tokens/layout.tsx
  • apps/portal/src/app/contracts/extensions/page.tsx
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/tokens/sidebar.tsx
  • apps/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 @/types or local types.ts barrels
Prefer type aliases over interface except for nominal shapes
Avoid any and unknown unless unavoidable; narrow generics when possible
Choose composition over inheritance; leverage utility types (Partial, Pick, etc.)
Comment only ambiguous logic; avoid restating TypeScript in prose

Files:

  • apps/portal/src/app/contracts/layout.tsx
  • apps/portal/src/app/tokens/layout.tsx
  • apps/portal/src/app/contracts/extensions/page.tsx
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/tokens/sidebar.tsx
  • apps/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.tsx
  • apps/portal/src/app/tokens/layout.tsx
  • apps/portal/src/app/contracts/extensions/page.tsx
  • apps/portal/src/app/Header.tsx
  • apps/portal/src/app/tokens/sidebar.tsx
  • apps/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 resolution

Files 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: Add import "server-only" directive for server component

According 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 types
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} : Limit each file to one stateless, single-responsibility function for clarity
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} : 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 prose
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} : 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 extensions
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} : 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` barrels
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: .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 examples

The override example with detailed comments explaining the _canMint function 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 URL

It 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 the href. Otherwise, confirm that pointing to the TypeScript hooks docs is intentional.

• File: apps/portal/src/app/contracts/sidebar.tsx
Lines: 74–76

          href: "/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

Engine is 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
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.

Comment on lines +8 to +16
const myEvent = prepareEvent({
signature: "event Transfer(address indexed from, address indexed to, uint256 value)",
});

const events = await getContractEvents({
contract: myContract,
events: [myEvent],
});
```
Copy link
Contributor

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.

Suggested change
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.

Comment on lines +26 to +30
const events = await getContractEvents({
contract: myContract,
events: [transferEvent()],
});
```
Copy link
Contributor

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.

Comment on lines +37 to +38
npx thirdweb generate <contractId>/<contractAddress>
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
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.

Comment on lines +31 to +36
const contract = getContract({
client,
chain: optimism,
address: USDC_ADDRESS,
});

Copy link
Contributor

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.

Suggested change
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.

Comment on lines +1 to +22
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";
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
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.

Comment on lines +608 to +656
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}");
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
```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.

Comment on lines +683 to +685
- [Contract Events](/contracts/read)

## Explore Full API References
Copy link
Contributor

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.

Suggested change
- [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.

Comment on lines +14 to +21
description:
"Easily create, deploy, and manage smart contracts on any EVM compatible blockchain",
image: {
icon: "contract",
title: "thirdweb contracts",
},
title: "thirdweb Contracts",
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

Suggested change
- 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.

@joaquim-verges joaquim-verges merged commit a491de4 into main Jul 22, 2025
25 checks passed
@joaquim-verges joaquim-verges deleted the Replace_Insight_and_Vault_with_Tokens_in_header_navigation branch July 22, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Portal Involves changes to the Portal (docs) codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants