Skip to content

Conversation

@joaquim-verges
Copy link
Member

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


PR-Codex overview

This PR focuses on updating the thirdweb library to enhance server wallet configurations, improve API documentation, and introduce new execution options for EOA and EIP-7702 transactions.

Detailed summary

  • Updated server wallet config types for EOA and EIP-7702 execution.
  • Added pagination support in GetServerWalletsArgs.
  • Enhanced documentation for contract reading and wallet creation.
  • Introduced new types for EIP-7702 and EOA execution options.
  • Updated test cases for wallet operations and transaction handling.

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

Summary by CodeRabbit

  • Documentation

    • Improved and expanded documentation for contract reading and server wallet creation, including detailed execution strategies and updated descriptions.
    • Added and updated changeset files to document patch updates and configuration changes.
  • New Features

    • Introduced support for new execution option types ("EOA" and "EIP7702") and enhanced transaction parameter handling for server wallets.
    • Added pagination support when listing server wallets, allowing users to specify page and limit parameters.
  • Bug Fixes

    • Updated test cases to reflect new wallet address environment variable and corrected assertions for server wallet retrieval.
  • Enhancements

    • Expanded and refined TypeScript types to support new execution options, transaction types, error details, and pagination metadata.

@vercel
Copy link

vercel bot commented Jul 20, 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 21, 2025 0:37am
nebula ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2025 0:37am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2025 0:37am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2025 0:37am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 21, 2025 0:37am

@changeset-bot
Copy link

changeset-bot bot commented Jul 20, 2025

🦋 Changeset detected

Latest commit: 538a356

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@thirdweb-dev/engine Patch
thirdweb Patch
@thirdweb-dev/nebula Patch
@thirdweb-dev/wagmi-adapter Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 20, 2025

Walkthrough

The changes introduce new types and options for EOA and EIP-7702 transaction execution in the engine and thirdweb packages. Type definitions are expanded, JSDoc comments are updated, and pagination support is added for listing server wallets. Tests and internal logic are adjusted to accommodate these enhancements, with no changes to function signatures or exported entities.

Changes

File(s) Change Summary
.changeset/large-hornets-scream.md
.changeset/whole-ducks-cheat.md
Added changeset files documenting patch updates for @thirdweb-dev/engine and thirdweb packages, referencing API version updates and EOA/EIP-7702 execution options.
packages/engine/src/client/sdk.gen.ts Expanded JSDoc comments for readContract and createAccount functions to clarify execution strategies and account creation behavior. No code or signature changes.
packages/engine/src/client/types.gen.ts Introduced new types for EOA/EIP-7702 execution, expanded transaction data types, added pagination and metadata fields, and refined error and webhook types. No removals; only additions and enhancements to type definitions.
packages/thirdweb/src/engine/list-server-wallets.ts Added optional limit and page parameters for pagination to GetServerWalletsArgs and updated getServerWallets to support paginated queries.
packages/thirdweb/src/engine/server-wallet.test.ts Updated tests to use new environment variable, adjusted assertions for paginated results, changed chain for transaction test, and commented out domain setup.
packages/thirdweb/src/engine/server-wallet.ts Internally updated handling of execution and signing options to support new "EOA" and "EIP7702" types and added gasLimit mapping in transaction enqueuing. No changes to exported entities.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ThirdwebSDK
    participant EngineAPI

    User->>ThirdwebSDK: getServerWallets({ limit, page })
    ThirdwebSDK->>EngineAPI: listAccounts({ page, limit })
    EngineAPI-->>ThirdwebSDK: { accounts, pagination }
    ThirdwebSDK-->>User: { accounts, pagination }
Loading
sequenceDiagram
    participant User
    participant ThirdwebSDK
    participant EngineAPI

    User->>ThirdwebSDK: serverWallet({ executionOptions: { type: "EOA" or "EIP7702", ... } })
    ThirdwebSDK->>EngineAPI: executeTransaction({ type: "EOA"/"EIP7702", from, chainId, ... })
    EngineAPI-->>ThirdwebSDK: transactionResponse
    ThirdwebSDK-->>User: transactionResponse
Loading

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

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

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between f05f45b and 538a356.

📒 Files selected for processing (7)
  • .changeset/large-hornets-scream.md (1 hunks)
  • .changeset/whole-ducks-cheat.md (1 hunks)
  • packages/engine/src/client/sdk.gen.ts (2 hunks)
  • packages/engine/src/client/types.gen.ts (20 hunks)
  • packages/thirdweb/src/engine/list-server-wallets.ts (2 hunks)
  • packages/thirdweb/src/engine/server-wallet.test.ts (3 hunks)
  • packages/thirdweb/src/engine/server-wallet.ts (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • .changeset/large-hornets-scream.md
  • packages/thirdweb/src/engine/list-server-wallets.ts
  • packages/thirdweb/src/engine/server-wallet.test.ts
  • .changeset/whole-ducks-cheat.md
  • packages/engine/src/client/sdk.gen.ts
  • packages/thirdweb/src/engine/server-wallet.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.{ts,tsx,js,jsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (2)
📓 Common learnings
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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 packages/thirdweb/src/wallets/** : Smart wallets with account abstraction
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.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/** : 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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
Learnt from: MananTank
PR: thirdweb-dev/js#7081
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx:110-118
Timestamp: 2025-05-20T18:54:15.781Z
Learning: In the thirdweb dashboard's token asset creation flow, the `transferBatch` function from `thirdweb/extensions/erc20` accepts the raw quantity values from the form without requiring explicit conversion to wei using `toUnits()`. The function appears to handle this conversion internally or is designed to work with the values in the format they're already provided.
packages/engine/src/client/types.gen.ts (7)
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
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: gregfromstl
PR: thirdweb-dev/js#7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (`packages/thirdweb/src/bridge/Webhook.ts`), the `currencyAmount` field is intentionally typed as `z.number()` while other amount fields use `z.string()` because `currencyAmount` represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (`currencyAmount` vs `amount`) reflects this intentional distinction.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.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/**/api/**/*.{ts,tsx} : Return typed results (`Project[]`, `User[]`, …) – avoid `any`.
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/wallets/** : Smart wallets with account abstraction
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
⏰ 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: Size
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (8)
packages/engine/src/client/types.gen.ts (8)

472-480: Well-defined EIP-7702 execution options type.

The type definition is clean and properly documented, with appropriate use of AddressDef for the EOA address field.


548-577: Excellent documentation and type definition for EOA execution options.

The comprehensive JSDoc documentation clearly explains use cases, features, and capabilities of EOA execution, making this type very developer-friendly.


724-736: Appropriate addition of gas limit control.

The optional gasLimit field with proper nullability and clear documentation provides necessary transaction gas control while maintaining backward compatibility.


1004-1040: Correct implementation of EIP-7702 signed authorization schema.

The type definition accurately represents the EIP-7702 signed authorization structure with appropriate field types and comprehensive documentation for all cryptographic components.


1068-1080: Proper extension of execution options union type.

The discriminated union correctly incorporates the new EOA and EIP-7702 execution options while maintaining consistency with the existing pattern.


1120-1185: Well-structured transaction type definitions for all Ethereum formats.

The type definitions correctly represent EIP-1559, EIP-7702, and legacy transaction formats with appropriate field types, nullability, and comprehensive documentation.


1438-1470: Well-implemented pagination support for account listing.

The pagination implementation follows standard patterns with proper query parameters and response metadata, while maintaining backward compatibility with existing account data structure.


889-889: Incorrect breaking change warning for webhookOptions

Both occurrences of webhookOptions in types.gen.ts remain optional arrays, so there is no breaking change:

  • SendTransactionRequest.webhookOptions remains optional (webhookOptions?: Array<WebhookOptions>) at line 889
  • The other request type’s webhookOptions is also still optional at line 1242
  • No instances of a required webhookOptions: Array<WebhookOptions> were found

The newly added userMetadata field is optional and scoped with a 4 KB limit, which isn’t breaking existing clients.

Likely an incorrect or invalid review comment.

✨ 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 packages SDK Involves changes to the thirdweb SDK labels Jul 20, 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/thirdweb/src/engine/server-wallet.test.ts (1)

38-44: Verify the commented setThirdwebDomains call.

The setThirdwebDomains call is commented out. Ensure this doesn't break test functionality or domain resolution for the engine cloud endpoints.

Should this code be uncommented or is there a specific reason for disabling domain configuration in tests?

packages/engine/src/client/types.gen.ts (1)

754-754: Consider adding JSDoc for MulticallDocType

The MulticallDocType type alias would benefit from documentation explaining when a boolean vs address should be used.

+/**
+ * Multicall configuration - boolean to enable/disable or address for custom multicall contract
+ */
 export type MulticallDocType = boolean | AddressDef;

Also applies to: 798-799

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 84eaded and f05f45b.

📒 Files selected for processing (7)
  • .changeset/large-hornets-scream.md (1 hunks)
  • .changeset/whole-ducks-cheat.md (1 hunks)
  • packages/engine/src/client/sdk.gen.ts (2 hunks)
  • packages/engine/src/client/types.gen.ts (20 hunks)
  • packages/thirdweb/src/engine/list-server-wallets.ts (2 hunks)
  • packages/thirdweb/src/engine/server-wallet.test.ts (3 hunks)
  • packages/thirdweb/src/engine/server-wallet.ts (4 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.{ts,tsx,js,jsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
**/*.test.{ts,tsx}

Instructions used from:

Sources:
📄 CodeRabbit Inference Engine

  • CLAUDE.md
🧠 Learnings (8)
📓 Common learnings
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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 packages/thirdweb/src/wallets/** : Smart wallets with account abstraction
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.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/** : 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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
Learnt from: MananTank
PR: thirdweb-dev/js#7081
File: apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/assets/create/create-token-page-impl.tsx:110-118
Timestamp: 2025-05-20T18:54:15.781Z
Learning: In the thirdweb dashboard's token asset creation flow, the `transferBatch` function from `thirdweb/extensions/erc20` accepts the raw quantity values from the form without requiring explicit conversion to wei using `toUnits()`. The function appears to handle this conversion internally or is designed to work with the values in the format they're already provided.
.changeset/large-hornets-scream.md (1)
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
.changeset/whole-ducks-cheat.md (5)
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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/wallets/** : Smart wallets with account abstraction
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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
packages/thirdweb/src/engine/list-server-wallets.ts (6)
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
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/wallets/** : Smart wallets with account abstraction
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: MananTank
PR: thirdweb-dev/js#7227
File: apps/dashboard/src/app/(app)/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/OpenEditionMetadata.tsx:26-26
Timestamp: 2025-05-30T17:14:25.332Z
Learning: The ModuleCardUIProps interface already includes a client prop of type ThirdwebClient, so when components use `Omit<ModuleCardUIProps, "children" | "updateButton">`, they inherit the client prop without needing to add it explicitly.
packages/thirdweb/src/engine/server-wallet.test.ts (9)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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/wallets/** : Smart wallets with account abstraction
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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Keep tests deterministic and side-effect free
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
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} : Accessing server-only environment variables or secrets.
packages/engine/src/client/sdk.gen.ts (2)
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
packages/thirdweb/src/engine/server-wallet.ts (8)
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
Learnt from: joaquim-verges
PR: thirdweb-dev/js#7268
File: packages/thirdweb/src/wallets/in-app/core/wallet/in-app-core.ts:210-216
Timestamp: 2025-06-03T23:44:40.243Z
Learning: EIP7702 wallets do not need special handling for switching chains, unlike EIP4337 wallets which require reconnection when switching chains. In the switchChain method condition, EIP7702 should be intentionally excluded from the reconnection logic.
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
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/wallets/** : Smart wallets with account abstraction
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/wallets/** : Support for in-app wallets (social/email login)
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.ts`
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to **/*.test.{ts,tsx} : Use `FORKED_ETHEREUM_CHAIN` for mainnet interactions and `ANVIL_CHAIN` for isolated tests
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
packages/engine/src/client/types.gen.ts (7)
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/wallets/** : EIP-1193, EIP-5792, EIP-7702 standard support in wallet modules
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: gregfromstl
PR: thirdweb-dev/js#7450
File: packages/thirdweb/src/bridge/Webhook.ts:57-81
Timestamp: 2025-06-26T19:46:04.024Z
Learning: In the onramp webhook schema (`packages/thirdweb/src/bridge/Webhook.ts`), the `currencyAmount` field is intentionally typed as `z.number()` while other amount fields use `z.string()` because `currencyAmount` represents fiat currency amounts in decimals (like $10.50), whereas other amount fields represent token amounts in wei (very large integers that benefit from bigint representation). The different naming convention (`currencyAmount` vs `amount`) reflects this intentional distinction.
Learnt from: CR
PR: thirdweb-dev/js#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-18T19:19:55.613Z
Learning: Applies to test/src/test-wallets.ts : Predefined test accounts are in `test/src/test-wallets.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/**/api/**/*.{ts,tsx} : Return typed results (`Project[]`, `User[]`, …) – avoid `any`.
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/wallets/** : Smart wallets with account abstraction
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/wallets/** : Unified `Wallet` and `Account` interfaces in wallet architecture
⏰ 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). (7)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (21)
.changeset/whole-ducks-cheat.md (1)

1-6: LGTM! Clear changeset documentation.

The changeset properly documents the patch-level update for server wallet configuration types supporting EIP-7702 and EOA execution.

.changeset/large-hornets-scream.md (1)

1-6: LGTM! Appropriate changeset for engine API update.

The changeset correctly documents the patch-level API update for the engine package.

packages/thirdweb/src/engine/list-server-wallets.ts (2)

9-10: LGTM! Clean pagination parameter addition.

The optional limit and page parameters are properly typed and maintain backward compatibility.


35-39: LGTM! Correct pagination parameter passing.

The pagination parameters are correctly passed to the listAccounts API call within the query object, following standard REST API patterns.

packages/thirdweb/src/engine/server-wallet.test.ts (3)

46-46: LGTM! Correct environment variable for EOA testing.

The switch to ENGINE_CLOUD_WALLET_ADDRESS_EOA aligns with the new EOA execution type support.


64-67: LGTM! Test assertions updated for paginated response structure.

The assertions correctly check serverWallets.accounts instead of serverWallets directly, reflecting the new paginated API response structure.


114-114: LGTM! Chain updated for test stability.

The change from arbitrumSepolia to baseSepolia likely improves test reliability.

packages/thirdweb/src/engine/server-wallet.ts (4)

184-195: LGTM! Correct implementation of EOA and EIP-7702 execution options.

The new execution option types are properly implemented with appropriate chainId and from address fields. The structure aligns with the expected API contract.


207-207: LGTM! Important case correction for type consistency.

Changing from lowercase "eoa" to uppercase "EOA" ensures consistency with the TypeScript type definitions.


234-241: LGTM! Correct signing options handling for EIP-7702 and EOA.

Both EIP7702 and EOA execution types correctly map to "EOA" signing type, which aligns with the retrieved learning that EIP-7702 wallets don't need special handling for signing operations.


268-268: LGTM! Proper gas to gasLimit field mapping.

The conversion from gas to gasLimit with appropriate type conversion (number or undefined) follows the expected API contract for transaction parameters.

packages/engine/src/client/sdk.gen.ts (3)

1-1: Auto-generated file modifications detected

Since this file is auto-generated by @hey-api/openapi-ts, ensure that the JSDoc changes are made in the source OpenAPI specification rather than directly in this file to prevent them from being overwritten in future generations.


172-178: Clear and comprehensive documentation for multicall execution strategy

The enhanced JSDoc comment effectively explains the intelligent execution strategy and multicall behavior, which will help developers understand the nuanced handling of different call scenarios.


277-278: Accurate description of server wallet retrieval behavior

The updated JSDoc correctly describes that the method retrieves existing EOAs rather than always creating new ones, which is an important behavioral detail for users to understand.

packages/engine/src/client/types.gen.ts (7)

1-1: Auto-generated file modifications detected

As with sdk.gen.ts, ensure that all type definition changes are made in the source OpenAPI specification to maintain consistency and prevent loss of changes during regeneration.


472-480: Well-structured execution option types for EOA and EIP-7702

The new Eip7702ExecutionOptions and EoaExecutionOptions types are properly defined with clear documentation. The extensive JSDoc for EoaExecutionOptions provides excellent context about use cases, features, and transaction type support.

Also applies to: 548-577


1004-1040: Comprehensive EIP-7702 signed authorization structure

The SignedAuthorizationSchema type correctly captures all required fields for EIP-7702 delegated transactions with clear documentation for each field.


1074-1080: Correct integration of new execution options into union type

The new execution option types are properly integrated into the SpecificExecutionOptions union with appropriate discriminators.


1242-1246: Good addition of userMetadata field with size limit

The userMetadata field with a 4KB limit is a useful addition for webhook customization. The size limit helps prevent abuse.


1438-1467: Well-implemented pagination support

The pagination parameters and response structure are properly typed and follow standard pagination patterns.

Also applies to: 1463-1467


889-890: webhookOptions remains optional – no breaking change

The generated types in packages/engine/src/client/types.gen.ts still declare

webhookOptions?: Array<WebhookOptions>;

(at lines 889 and 1264), confirming this field is optional. The Engine API v1 docs also state that webhookOptions can be omitted when creating a webhook. You can disregard the original breaking‐change warning.

Likely an incorrect or invalid review comment.

@codecov
Copy link

codecov bot commented Jul 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 56.38%. Comparing base (31d7173) to head (538a356).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/engine/server-wallet.ts 0.00% 22 Missing ⚠️
...ackages/thirdweb/src/engine/list-server-wallets.ts 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7652      +/-   ##
==========================================
- Coverage   56.43%   56.38%   -0.05%     
==========================================
  Files         908      908              
  Lines       58193    58218      +25     
  Branches     4226     4222       -4     
==========================================
- Hits        32840    32829      -11     
- Misses      25244    25281      +37     
+ Partials      109      108       -1     
Flag Coverage Δ
packages 56.38% <0.00%> (-0.05%) ⬇️
Files with missing lines Coverage Δ
...ackages/thirdweb/src/engine/list-server-wallets.ts 16.66% <0.00%> (-3.34%) ⬇️
packages/thirdweb/src/engine/server-wallet.ts 3.38% <0.00%> (-0.26%) ⬇️

... and 2 files with indirect coverage changes

🚀 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 force-pushed the _Engine_Update_server_wallet_config_types_for_EOA_and_EIP-7702_execution branch from f05f45b to 538a356 Compare July 21, 2025 00:27
@joaquim-verges joaquim-verges merged commit 620e294 into main Jul 21, 2025
23 of 25 checks passed
@joaquim-verges joaquim-verges deleted the _Engine_Update_server_wallet_config_types_for_EOA_and_EIP-7702_execution branch July 21, 2025 00:43
@joaquim-verges joaquim-verges mentioned this pull request Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants