-
Notifications
You must be signed in to change notification settings - Fork 567
arb-docs #7799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
arb-docs #7799
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThree new documentation pages were added: one for Stylus Airdrop Contracts, one for deploying Stylus Contracts on Arbitrum, and one for contract security. Additionally, the sidebar was updated to include a new collapsible "Arbitrum Stylus" section with links to the new documentation pages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7799 +/- ##
=======================================
Coverage 56.34% 56.34%
=======================================
Files 905 905
Lines 58788 58788
Branches 4141 4141
=======================================
Hits 33122 33122
Misses 25561 25561
Partials 105 105
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
apps/portal/src/app/contracts/security/page.mdx (1)
3-3
: Clarify wording and add helpful link to “Explore”.The current sentence is slightly awkward and misses an opportunity to deep-link to the contracts explorer.
-All thirdweb pre-built contracts are audited by third-party security firms. You can see the attached audit reports for each contract linked on the contract page on Explore. +All thirdweb pre-built contracts are audited by third-party security firms. Audit reports are linked on each contract’s page in the [Explore](https://thirdweb.com/explore) section.apps/portal/src/app/contracts/sidebar.tsx (1)
48-61
: Add a visual separator after the new section to preserve sidebar grouping.
Guides → (separator) → Arbitrum Stylus → (separator) → API References
maintains the established grouping pattern.
Without the separator, “API References” visually merges with “Arbitrum Stylus”.name: "Arbitrum Stylus", }, + { separator: true },
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx (2)
15-15
: Remove stray space in “100 %”.-while staying 100 % interoperable +while staying 100% interoperable
32-34
: Fix typos and duplicate wording in prerequisites.-- Install Rust tool chain by running `curl https://sh.rustup.rs -sSf | sh` or visit rust-lang.org -- Install solc by running by running `npm install -g solc` or visit soliditylang.org +- Install the Rust toolchain with `curl https://sh.rustup.rs -sSf | sh` or visit rust-lang.org +- Install `solc` with `npm install -g solc` or visit soliditylang.orgapps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx (1)
18-18
: Correct spelling of “distribution”.-Learn how to deploy Stylus Airdrop contracts through dashboard or CLI for inexpensive, WASM-powered distribituion on [Arbitrum](https://thirdweb.com/arbitrum) chain. +Learn how to deploy Stylus Airdrop contracts through the dashboard or CLI for inexpensive, WASM-powered distribution on the [Arbitrum](https://thirdweb.com/arbitrum) chain.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
(1 hunks)apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
(1 hunks)apps/portal/src/app/contracts/security/page.mdx
(1 hunks)apps/portal/src/app/contracts/sidebar.tsx
(1 hunks)
🧰 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 localtypes.ts
barrels
Prefer type aliases over interface except for nominal shapes
Avoidany
andunknown
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/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/sidebar.tsx
🧠 Learnings (18)
📓 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
📚 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/** : Auto-generated contracts from ABI definitions in extensions
Applied to files:
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
apps/portal/src/app/contracts/security/page.mdx
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: applies to packages/thirdweb/src/exports/** : every public symbol must have comprehensive tsdoc with...
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`)
Applied to files:
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
📚 Learning: the `projectmeta` prop is not required for the server-rendered `contracttokenspage` component in the...
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.
Applied to files:
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
apps/portal/src/app/contracts/security/page.mdx
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
📚 Learning: in team/project contract pages under routes like `/team/[team_slug]/[project_slug]/contract/[chainid...
Learnt from: MananTank
PR: thirdweb-dev/js#7152
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/nfts/page.tsx:20-20
Timestamp: 2025-05-26T16:26:58.068Z
Learning: In team/project contract pages under routes like `/team/[team_slug]/[project_slug]/contract/[chainIdOrSlug]/[contractAddress]/*`, users are always logged in by design. The hardcoded `isLoggedIn={true}` prop in these pages is intentional and correct, not a bug to be fixed.
Applied to files:
apps/portal/src/app/contracts/security/page.mdx
📚 Learning: the thirdweb `contract` object is serializable and can safely be used in contexts (e.g., react-query...
Learnt from: MananTank
PR: thirdweb-dev/js#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.
Applied to files:
apps/portal/src/app/contracts/security/page.mdx
📚 Learning: in the thirdweb dashboard codebase, redirecttocontractlandingpage function already handles execution...
Learnt from: MananTank
PR: thirdweb-dev/js#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.
Applied to files:
apps/portal/src/app/contracts/security/page.mdx
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
📚 Learning: the `fetchdashboardcontractmetadata` function from "@3rdweb-sdk/react/hooks/usedashboardcontractmeta...
Learnt from: MananTank
PR: thirdweb-dev/js#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.
Applied to files:
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
📚 Learning: in event-tracking (`usetrack`) calls across the dashboard, the team intentionally keeps `contracttyp...
Learnt from: MananTank
PR: thirdweb-dev/js#7332
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/public-pages/nft/overview/nft-drop-claim.tsx:170-178
Timestamp: 2025-06-13T13:50:08.622Z
Learning: In event-tracking (`useTrack`) calls across the dashboard, the team intentionally keeps `contractType` generic as `"NFTCollection"` even for ERC-721 drops; contract differentiation is handled via the `ercType` field instead.
Applied to files:
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : layouts should reuse `sidebarlayout` / `fullwidthsidebarlayout...
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`).
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : use `navlink` for internal navigation wit...
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
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : prefer composable primitives over custom markup: `button`, `in...
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`.
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: the thirdwebbarchart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(side...
Learnt from: arcoraven
PR: thirdweb-dev/js#7505
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx:186-204
Timestamp: 2025-07-10T10:18:33.238Z
Learning: The ThirdwebBarChart component in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/webhooks/analytics/components/WebhookAnalyticsCharts.tsx does not accept standard accessibility props like `aria-label` and `role` in its TypeScript interface, causing compilation errors when added.
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: applies to apps/{dashboard,playground-web}/**/*.{ts,tsx} : import ui primitives from `@/components/u...
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
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: applies to dashboard/**/*.{tsx,jsx} : for notices & skeletons rely on `announcementbanner`, `generic...
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`.
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: in apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-n...
Learnt from: MananTank
PR: thirdweb-dev/js#7315
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx:153-226
Timestamp: 2025-06-10T00:50:20.795Z
Learning: In apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/assets/create/nft/launch-nft.tsx, the updateStatus function correctly expects a complete MultiStepState["status"] object. For pending states, { type: "pending" } is the entire status object. For error states, { type: "error", message: React.ReactNode } is the entire status object. The current code incorrectly spreads the entire step object instead of passing just the status object.
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 Learning: in the accounts component at apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractad...
Learnt from: jnsdls
PR: thirdweb-dev/js#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.
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
📚 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: Surface breaking changes prominently in PR descriptions
Applied to files:
apps/portal/src/app/contracts/sidebar.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Unit Tests
- GitHub Check: Lint Packages
- GitHub Check: E2E Tests (pnpm, webpack)
- GitHub Check: Build Packages
- GitHub Check: Size
- GitHub Check: E2E Tests (pnpm, vite)
- GitHub Check: E2E Tests (pnpm, esbuild)
- GitHub Check: Analyze (javascript)
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
Outdated
Show resolved
Hide resolved
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
Outdated
Show resolved
Hide resolved
size-limit report 📦
|
apps/portal/src/app/contracts/arbitrum-stylus/airdrop-contract/page.mdx
Outdated
Show resolved
Hide resolved
apps/portal/src/app/contracts/arbitrum-stylus/stylus-contract/page.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some hallucinations in there that needs fixing
|
||
// if user has wallet installed, connect to it | ||
if (injectedProvider("io.metamask")) { | ||
await wallet.connect({ client }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change the connection flow to just be
const wallet = createWallet("io.metamask"); // or any wallet id
const account = await wallet.connect({ client });
remove the if/else entirely
same in the other code snippet
PR-Codex overview
This PR focuses on enhancing the documentation for thirdweb's Stylus contracts, including security, deployment, and airdrop functionalities on the Arbitrum network. It introduces new sections and examples for better user guidance.
Detailed summary
Contract security
section inpage.mdx
.sidebar.tsx
to include a collapsible section forArbitrum Stylus
with links to deploy and airdrop contracts.Stylus Contracts
andStylus Airdrop Contracts
in their respectivepage.mdx
files, outlining benefits, prerequisites, and step-by-step guides for deployment and interaction.Summary by CodeRabbit