Skip to content

Version Packages #7079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025
Merged

Version Packages #7079

merged 1 commit into from
May 20, 2025

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented May 19, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Minor Changes

  • #7064 64964da Thanks @gregfromstl! - Adds Bridge.Transfer module for direct token transfers:

    import { Bridge, NATIVE_TOKEN_ADDRESS } from "thirdweb";
    
    const quote = await Bridge.Transfer.prepare({
      chainId: 1,
      tokenAddress: NATIVE_TOKEN_ADDRESS,
      amount: toWei("0.01"),
      sender: "0x...",
      receiver: "0x...",
      client: thirdwebClient,
    });

    This will return a quote that might look like:

    {
      originAmount: 10000026098875381n,
      destinationAmount: 10000000000000000n,
      blockNumber: 22026509n,
      timestamp: 1741730936680,
      estimatedExecutionTimeMs: 1000
      steps: [
        {
          originToken: {
            chainId: 1,
            address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            symbol: "ETH",
            name: "Ethereum",
            decimals: 18,
            priceUsd: 2000,
            iconUri: "https://..."
          },
          destinationToken: {
            chainId: 1,
            address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            symbol: "ETH",
            name: "Ethereum",
            decimals: 18,
            priceUsd: 2000,
            iconUri: "https://..."
          },
          originAmount: 10000026098875381n,
          destinationAmount: 10000000000000000n,
          estimatedExecutionTimeMs: 1000
          transactions: [
            {
              action: "approval",
              id: "0x",
              to: "0x...",
              data: "0x...",
              chainId: 1,
              type: "eip1559"
            },
            {
              action: "transfer",
              to: "0x...",
              value: 10000026098875381n,
              data: "0x...",
              chainId: 1,
              type: "eip1559"
            }
          ]
        }
      ],
      expiration: 1741730936680,
      intent: {
        chainId: 1,
        tokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
        amount: 10000000000000000n,
        sender: "0x...",
        receiver: "0x..."
      }
    }

    Sending the transactions

    The transactions array is a series of ox EIP-1559 transactions that must be executed one after the other in order to fulfill the complete route. There are a few things to keep in mind when executing these transactions:

    • Approvals will have the approval action specified. You can perform approvals with sendAndConfirmTransaction, then proceed to the next transaction.
    • All transactions are assumed to be executed by the sender address, regardless of which chain they are on. The final transaction will use the receiver as the recipient address.
    • If an expiration timestamp is provided, all transactions must be executed before that time to guarantee successful execution at the specified price.

    NOTE: To get the status of each non-approval transaction, use Bridge.status rather than checking for transaction inclusion. This function will ensure full completion of the transfer.

    You can include arbitrary data to be included on any webhooks and status responses with the purchaseData option:

    const quote = await Bridge.Transfer.prepare({
      chainId: 1,
      tokenAddress: NATIVE_TOKEN_ADDRESS,
      amount: toWei("0.01"),
      sender: "0x...",
      receiver: "0x...",
      purchaseData: {
        reference: "payment-123",
        metadata: {
          note: "Transfer to Alice",
        },
      },
      client: thirdwebClient,
    });

    Fees

    There may be fees associated with the transfer. These fees are paid by the feePayer address, which defaults to the sender address. You can specify a different address with the feePayer option. If you do not specify an option or explicitly specify sender, the fees will be added to the input amount. If you specify the receiver as the fee payer the fees will be subtracted from the destination amount.

    For example, if you were to request a transfer with feePayer set to receiver:

    const quote = await Bridge.Transfer.prepare({
      chainId: 1,
      tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
      amount: 100_000_000n, // 100 USDC
      sender: "0x...",
      receiver: "0x...",
      feePayer: "receiver",
      client: thirdwebClient,
    });

    The returned quote might look like:

    {
      originAmount: 100_000_000n, // 100 USDC
      destinationAmount: 99_970_000n, // 99.97 USDC
      ...
    }

    If you were to request a transfer with feePayer set to sender:

    const quote = await Bridge.Transfer.prepare({
      chainId: 1,
      tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
      amount: 100_000_000n, // 100 USDC
      sender: "0x...",
      receiver: "0x...",
      feePayer: "sender",
      client: thirdwebClient,
    });

    The returned quote might look like:

    {
      originAmount: 100_030_000n, // 100.03 USDC
      destinationAmount: 100_000_000n, // 100 USDC
      ...
    }

Patch Changes

  • #7064 64964da Thanks @gregfromstl! - Faster useSendTransaction execution

  • #7092 d623978 Thanks @joaquim-verges! - Show deposit modal for tokens that don't have any UB routes

  • #7076 89ccc80 Thanks @joaquim-verges! - Added Bridge.Onramp.prepare and Bridge.Onramp.status functions

    Bridge.Onramp.prepare

    Prepares an onramp transaction, returning a link from the specified provider to onramp to the specified token.

    import { Bridge } from "thirdweb";
    import { ethereum } from "thirdweb/chains";
    import { NATIVE_TOKEN_ADDRESS, toWei } from "thirdweb/utils";
    
    const preparedOnramp = await Bridge.Onramp.prepare({
      client: thirdwebClient,
      onramp: "stripe",
      chainId: ethereum.id,
      tokenAddress: NATIVE_TOKEN_ADDRESS,
      receiver: "0x...", // receiver's address
      amount: toWei("10"), // 10 of the destination token
      // Optional params:
      // sender: "0x...", // sender's address
      // onrampTokenAddress: NATIVE_TOKEN_ADDRESS, // token to initially onramp to
      // onrampChainId: 1, // chain to initially onramp to
      // currency: "USD",
      // maxSteps: 2,
      // purchaseData: { customId: "123" }
    });
    
    console.log(preparedOnramp.link); // URL to redirect the user to
    console.log(preparedOnramp.currencyAmount); // Price in fiat currency

    Bridge.Onramp.status

    Retrieves the status of an Onramp session created via Bridge.Onramp.prepare.

    import { Bridge } from "thirdweb";
    
    const onrampStatus = await Bridge.Onramp.status({
      id: "022218cc-96af-4291-b90c-dadcb47571ec",
      client: thirdwebClient,
    });
    
    // Possible results:
    // {
    //   status: "CREATED",
    //   transactions: [],
    //   purchaseData: {
    //     orderId: "abc-123",
    //   },
    // }
    //
    // or
    // {
    //   status: "PENDING",
    //   transactions: [],
    //   purchaseData: {
    //     orderId: "abc-123",
    //   },
    // }
    //
    // or
    // {
    //   status: "COMPLETED",
    //   transactions: [
    //     {
    //       chainId: 1,
    //       transactionHash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    //     },
    //   ],
    //   purchaseData: {
    //     orderId: "abc-123",
    //   },
    // }

@thirdweb-dev/[email protected]


PR-Codex overview

This PR updates the versions for @thirdweb-dev/wagmi-adapter and thirdweb, introduces new features in the Bridge module, and modifies type definitions for better structure.

Detailed summary

  • Updated @thirdweb-dev/wagmi-adapter version to 0.2.80.
  • Updated thirdweb version to 5.100.0.
  • Added Bridge.Transfer module for direct token transfers.
  • Introduced Bridge.Onramp.prepare and Bridge.Onramp.status functions.
  • Improved type definitions for better clarity and structure.

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

Summary by CodeRabbit

  • Revert

    • Removed previously introduced features for direct cross-chain token transfers and fiat onramp functionality.
    • Reverted performance improvements related to faster transaction execution.
    • Reverted minor UI enhancements for deposit modals on unsupported tokens.
  • Chores

    • Updated package versions and cleaned up documentation and metadata files.

@joaquim-verges joaquim-verges requested review from a team as code owners May 19, 2025 04:06
Copy link

vercel bot commented May 19, 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 May 20, 2025 10:08pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:08pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:08pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:08pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 10:08pm

Copy link
Contributor

graphite-app bot commented May 19, 2025

How to use the Graphite Merge Queue

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

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

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

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

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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels May 19, 2025
destinationAmount: 10000000000000000n,
blockNumber: 22026509n,
timestamp: 1741730936680,
estimatedExecutionTimeMs: 1000
Copy link
Contributor

Choose a reason for hiding this comment

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

There appears to be a missing comma after estimatedExecutionTimeMs: 1000 in the example code. This would cause a syntax error if someone copies this code directly. The correct syntax should be:

estimatedExecutionTimeMs: 1000,

This correction should be applied to both instances of this property in the example code to ensure it's valid JavaScript/TypeScript.

Suggested change
estimatedExecutionTimeMs: 1000
estimatedExecutionTimeMs: 1000,

Spotted by Diamond

Is this helpful? React 👍 or 👎 to let us know.

Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.59%. Comparing base (d623978) to head (9c92e5a).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7079      +/-   ##
==========================================
- Coverage   55.59%   55.59%   -0.01%     
==========================================
  Files         901      901              
  Lines       58123    58121       -2     
  Branches     4064     4064              
==========================================
- Hits        32315    32313       -2     
  Misses      25703    25703              
  Partials      105      105              
Flag Coverage Δ
packages 55.59% <ø> (-0.01%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented May 19, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 56.57 KB (0%) 1.2 s (0%) 242 ms (+152.5% 🔺) 1.4 s
thirdweb (cjs) 309.52 KB (0%) 6.2 s (0%) 866 ms (-3.9% 🔽) 7.1 s
thirdweb (minimal + tree-shaking) 5.69 KB (0%) 114 ms (0%) 61 ms (+556.5% 🔺) 175 ms
thirdweb/chains (tree-shaking) 531 B (0%) 11 ms (0%) 34 ms (+476.12% 🔺) 44 ms
thirdweb/react (minimal + tree-shaking) 19.5 KB (0%) 390 ms (0%) 85 ms (+388.19% 🔺) 475 ms

Copy link
Contributor

coderabbitai bot commented May 20, 2025

Walkthrough

This update removes documentation and code references for the Bridge.Transfer and Bridge.Onramp modules and their APIs, as well as the patch for faster useSendTransaction execution. The changelogs and package versions for thirdweb and wagmi-adapter are updated accordingly, reflecting these removals and version increments.

Changes

File(s) Change Summary
.changeset/open-readers-do.md Removed documentation for the useSendTransaction performance improvement patch.
.changeset/stale-yaks-bathe.md Deleted documentation for the Bridge.Transfer module, its API, usage examples, fee handling, and status checking.
.changeset/tidy-seas-sing.md Deleted documentation for Bridge.Onramp's prepare and status functions and their usage.
.changeset/sharp-symbols-unite.md Removed changeset metadata describing a patch for showing deposit modals for tokens without UB routes.
packages/thirdweb/CHANGELOG.md Removed entries documenting Bridge.Transfer and Bridge.Onramp modules and the useSendTransaction performance patch.
packages/thirdweb/package.json Updated version from 5.99.3 to 5.100.0; reformatted typesVersions field for readability without changing mappings.
packages/wagmi-adapter/CHANGELOG.md Added new version entry "0.2.80" without additional release notes.
packages/wagmi-adapter/package.json Updated version from 0.2.79 to 0.2.80 without other modifications.

Poem

The rabbit hops, some docs erased,
Transfers and onramps, now replaced.
Changelogs trimmed, the notes are neat,
Version numbers skip a beat.
In fields of code, the stories change—
The garden grows, then rearrange!
🐇✨

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • EIP-1559: 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 f5b9802 and 9c92e5a.

📒 Files selected for processing (8)
  • .changeset/open-readers-do.md (0 hunks)
  • .changeset/sharp-symbols-unite.md (0 hunks)
  • .changeset/stale-yaks-bathe.md (0 hunks)
  • .changeset/tidy-seas-sing.md (0 hunks)
  • packages/thirdweb/CHANGELOG.md (1 hunks)
  • packages/thirdweb/package.json (2 hunks)
  • packages/wagmi-adapter/CHANGELOG.md (1 hunks)
  • packages/wagmi-adapter/package.json (1 hunks)
💤 Files with no reviewable changes (4)
  • .changeset/open-readers-do.md
  • .changeset/sharp-symbols-unite.md
  • .changeset/tidy-seas-sing.md
  • .changeset/stale-yaks-bathe.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/wagmi-adapter/CHANGELOG.md
  • packages/wagmi-adapter/package.json
  • packages/thirdweb/package.json
🧰 Additional context used
🪛 Gitleaks (8.26.0)
packages/thirdweb/CHANGELOG.md

123-123: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


147-147: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Size
  • GitHub Check: Build Packages
  • GitHub Check: Lint Packages
  • GitHub Check: Analyze (javascript)

🪧 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.

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: 4

🔭 Outside diff range comments (1)
packages/wagmi-adapter/package.json (1)

35-39: 🛠️ Refactor suggestion

Update peerDependency for thirdweb to match the new release.
The adapter’s peerDependencies still require "thirdweb": "^5.85.0", but the main SDK is now at 5.100.0. To ensure compatibility, bump this version range.

Proposed diff:

--- a/packages/wagmi-adapter/package.json
+++ b/packages/wagmi-adapter/package.json
@@ peerDependencies
-    "thirdweb": "^5.85.0",
+    "thirdweb": "^5.100.0",
♻️ Duplicate comments (2)
packages/thirdweb/CHANGELOG.md (2)

30-30: Missing comma after estimatedExecutionTimeMs: 1000 will cause syntax errors.

There appears to be a missing comma after estimatedExecutionTimeMs: 1000 in the example code. This would cause a syntax error if someone copies this code directly.

-    estimatedExecutionTimeMs: 1000
+    estimatedExecutionTimeMs: 1000,

53-53: ⚠️ Potential issue

Missing comma in example code.

Similar to the previous issue, there's a missing comma after estimatedExecutionTimeMs: 1000 in this line of the example response object.

-        estimatedExecutionTimeMs: 1000
+        estimatedExecutionTimeMs: 1000,
🧹 Nitpick comments (1)
packages/wagmi-adapter/CHANGELOG.md (1)

3-4: Enhance changelog with summary details: The new 0.2.80 header is empty. Please include a brief description of the changes or fixes introduced in this version for better release traceability.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between b4f5cc7 and 1e0571d.

📒 Files selected for processing (7)
  • .changeset/open-readers-do.md (0 hunks)
  • .changeset/stale-yaks-bathe.md (0 hunks)
  • .changeset/tidy-seas-sing.md (0 hunks)
  • packages/thirdweb/CHANGELOG.md (1 hunks)
  • packages/thirdweb/package.json (1 hunks)
  • packages/wagmi-adapter/CHANGELOG.md (1 hunks)
  • packages/wagmi-adapter/package.json (1 hunks)
💤 Files with no reviewable changes (3)
  • .changeset/open-readers-do.md
  • .changeset/tidy-seas-sing.md
  • .changeset/stale-yaks-bathe.md
🧰 Additional context used
🪛 Gitleaks (8.26.0)
packages/thirdweb/CHANGELOG.md

123-123: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


147-147: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: Size
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (4)
packages/wagmi-adapter/package.json (2)

2-3: Discrepancy with AI-generated summary.
The summary mentions removal of Bridge.Transfer and Bridge.Onramp docs and a performance patch, but this file only contains a version bump for the wagmi-adapter.

Likely an incorrect or invalid review comment.


3-3: Version bump looks correct.
Updating "version" from 0.2.79 to 0.2.80 aligns with the automatic Changesets release.

packages/thirdweb/package.json (2)

1-4: Inconsistent AI summary: The AI-generated summary mentions removal of Bridge.Transfer and Bridge.Onramp documentation, but this file only contains a version bump to 5.100.0. The summary does not reflect the actual change here.

Likely an incorrect or invalid review comment.


3-3: Approve version bump: Bumping version to 5.100.0 correctly aligns with the release for the new Bridge.Transfer and Bridge.Onramp modules.

Comment on lines +3 to +4
## 0.2.80

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

Missing version bump in package.json: The changelog entry was added for 0.2.80, but ensure packages/wagmi-adapter/package.json is updated to this version to avoid mismatches during publish.

🤖 Prompt for AI Agents
In packages/wagmi-adapter/CHANGELOG.md at lines 3 to 4, the changelog shows
version 0.2.80 but the package.json file in packages/wagmi-adapter/package.json
has not been updated to this version. Update the version field in package.json
to 0.2.80 to keep it consistent with the changelog and prevent publish issues.


### Patch Changes

- [#7064](https://github.com/thirdweb-dev/js/pull/7064) [`64964da`](https://github.com/thirdweb-dev/js/commit/64964da22e11d4a40696d4c0aecb69f74c67fff8) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Faster useSendTransaction execution
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

Patch change for useSendTransaction should be removed per PR objectives.

According to the PR objectives, the patch for faster useSendTransaction execution should also be removed from the changelog as it's mentioned in the AI summary for removal.

🤖 Prompt for AI Agents
In packages/thirdweb/CHANGELOG.md at line 168, remove the entry referencing the
patch for faster useSendTransaction execution, as the PR objectives specify that
this patch should be excluded from the changelog.

@joaquim-verges joaquim-verges force-pushed the changeset-release/main branch from 1e0571d to 00f9567 Compare May 20, 2025 18:21
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: 1

♻️ Duplicate comments (4)
packages/thirdweb/CHANGELOG.md (4)

7-164: This Bridge.Transfer module documentation should be removed as per PR objectives.

According to the PR objectives and AI summary, this PR is specifically removing the documentation for Bridge.Transfer and Bridge.Onramp modules from the changelog. This entire section documenting the Bridge.Transfer module should be removed to align with the PR's purpose.

🧰 Tools
🪛 Gitleaks (8.26.0)

123-123: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


147-147: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


168-168: Patch change for useSendTransaction should be removed per PR objectives.

According to the PR objectives, the patch for faster useSendTransaction execution should also be excluded from the changelog as it's mentioned in the AI summary for removal.


170-244: This Bridge.Onramp module documentation should be removed as per PR objectives.

According to the PR objectives and AI summary, this PR is specifically removing the documentation for Bridge.Transfer and Bridge.Onramp modules from the changelog. This entire section about the Bridge.Onramp module should be removed to align with the PR's purpose.


30-30: Missing comma in code example creates a syntax error.

There appears to be a missing comma after estimatedExecutionTimeMs: 1000 in the example code. This would cause a syntax error if someone copies this code directly. The correct syntax should be:

-    estimatedExecutionTimeMs: 1000
+    estimatedExecutionTimeMs: 1000,

This correction should be applied to both instances of this property in the example code to ensure it's valid JavaScript/TypeScript.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 1e0571d and 00f9567.

📒 Files selected for processing (7)
  • .changeset/open-readers-do.md (0 hunks)
  • .changeset/stale-yaks-bathe.md (0 hunks)
  • .changeset/tidy-seas-sing.md (0 hunks)
  • packages/thirdweb/CHANGELOG.md (1 hunks)
  • packages/thirdweb/package.json (1 hunks)
  • packages/wagmi-adapter/CHANGELOG.md (1 hunks)
  • packages/wagmi-adapter/package.json (1 hunks)
💤 Files with no reviewable changes (3)
  • .changeset/open-readers-do.md
  • .changeset/stale-yaks-bathe.md
  • .changeset/tidy-seas-sing.md
✅ Files skipped from review due to trivial changes (2)
  • packages/wagmi-adapter/CHANGELOG.md
  • packages/thirdweb/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/wagmi-adapter/package.json
🧰 Additional context used
🪛 Gitleaks (8.26.0)
packages/thirdweb/CHANGELOG.md

123-123: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)


147-147: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: Build Packages
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Unit Tests
  • GitHub Check: Analyze (javascript)

```typescript
const quote = await Bridge.Transfer.prepare({
chainId: 1,
tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
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

Potential API keys detected in example code.

Security tools have flagged potential API keys in the example code. While these appear to be placeholders (like 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC token address), it's worth ensuring that no actual API keys or sensitive values are included in the examples. Consider using obviously fake values like 0x123... for all examples.

Also applies to: 147-147

🧰 Tools
🪛 Gitleaks (8.26.0)

123-123: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

🤖 Prompt for AI Agents
In packages/thirdweb/CHANGELOG.md at lines 123 and 147, the example code
includes real-looking token addresses that security tools may mistake for actual
API keys or sensitive data. Replace these addresses with clearly fake
placeholder values such as "0x123..." to avoid any confusion or security
concerns while keeping the examples illustrative.

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: 2

♻️ Duplicate comments (1)
packages/thirdweb/CHANGELOG.md (1)

166-168: ⚠️ Potential issue

Patch change for useSendTransaction should be removed per PR objectives.

According to the PR objectives, the patch for faster useSendTransaction execution should also be removed from the changelog as it's mentioned in the AI summary for removal.

-### Patch Changes
-
-- [#7064](https://github.com/thirdweb-dev/js/pull/7064) [`64964da`](https://github.com/thirdweb-dev/js/commit/64964da22e11d4a40696d4c0aecb69f74c67fff8) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Faster useSendTransaction execution
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 00f9567 and ba55c53.

📒 Files selected for processing (7)
  • .changeset/open-readers-do.md (0 hunks)
  • .changeset/stale-yaks-bathe.md (0 hunks)
  • .changeset/tidy-seas-sing.md (0 hunks)
  • packages/thirdweb/CHANGELOG.md (1 hunks)
  • packages/thirdweb/package.json (2 hunks)
  • packages/wagmi-adapter/CHANGELOG.md (1 hunks)
  • packages/wagmi-adapter/package.json (1 hunks)
💤 Files with no reviewable changes (3)
  • .changeset/open-readers-do.md
  • .changeset/tidy-seas-sing.md
  • .changeset/stale-yaks-bathe.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/wagmi-adapter/package.json
  • packages/wagmi-adapter/CHANGELOG.md
  • packages/thirdweb/package.json
⏰ Context from checks skipped due to timeout of 90000ms (8)
  • GitHub Check: Unit Tests
  • GitHub Check: E2E Tests (pnpm, esbuild)
  • GitHub Check: Size
  • GitHub Check: Lint Packages
  • GitHub Check: E2E Tests (pnpm, webpack)
  • GitHub Check: E2E Tests (pnpm, vite)
  • GitHub Check: Build Packages
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (3)
packages/thirdweb/CHANGELOG.md (3)

3-4: LGTM!

The version number is correctly included in the header.


5-6: LGTM!

The Minor Changes section header is correctly formatted.


246-246: LGTM!

This section with the version header is correctly formatted and should remain.

Comment on lines +170 to +246
- [#7076](https://github.com/thirdweb-dev/js/pull/7076) [`89ccc80`](https://github.com/thirdweb-dev/js/commit/89ccc80d9c5dd188bef495bda048c3aa7f0739af) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Added Bridge.Onramp.prepare and Bridge.Onramp.status functions

## Bridge.Onramp.prepare

Prepares an onramp transaction, returning a link from the specified provider to onramp to the specified token.

```typescript
import { Bridge } from "thirdweb";
import { ethereum } from "thirdweb/chains";
import { NATIVE_TOKEN_ADDRESS, toWei } from "thirdweb/utils";

const preparedOnramp = await Bridge.Onramp.prepare({
client: thirdwebClient,
onramp: "stripe",
chainId: ethereum.id,
tokenAddress: NATIVE_TOKEN_ADDRESS,
receiver: "0x...", // receiver's address
amount: toWei("10"), // 10 of the destination token
// Optional params:
// sender: "0x...", // sender's address
// onrampTokenAddress: NATIVE_TOKEN_ADDRESS, // token to initially onramp to
// onrampChainId: 1, // chain to initially onramp to
// currency: "USD",
// maxSteps: 2,
// purchaseData: { customId: "123" }
});

console.log(preparedOnramp.link); // URL to redirect the user to
console.log(preparedOnramp.currencyAmount); // Price in fiat currency
```

## Bridge.Onramp.status

Retrieves the status of an Onramp session created via Bridge.Onramp.prepare.

```typescript
import { Bridge } from "thirdweb";

const onrampStatus = await Bridge.Onramp.status({
id: "022218cc-96af-4291-b90c-dadcb47571ec",
client: thirdwebClient,
});

// Possible results:
// {
// status: "CREATED",
// transactions: [],
// purchaseData: {
// orderId: "abc-123",
// },
// }
//
// or
// {
// status: "PENDING",
// transactions: [],
// purchaseData: {
// orderId: "abc-123",
// },
// }
//
// or
// {
// status: "COMPLETED",
// transactions: [
// {
// chainId: 1,
// transactionHash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
// },
// ],
// purchaseData: {
// orderId: "abc-123",
// },
// }
```
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

This Bridge.Onramp module documentation should be removed as per PR objectives.

According to the AI summary, this PR is specifically removing documentation for the Bridge.Transfer and Bridge.Onramp modules from the changelog. This entire section about the Bridge.Onramp module should be removed to align with the PR objectives.

-- [#7076](https://github.com/thirdweb-dev/js/pull/7076) [`89ccc80`](https://github.com/thirdweb-dev/js/commit/89ccc80d9c5dd188bef495bda048c3aa7f0739af) Thanks [@joaquim-verges](https://github.com/joaquim-verges)! - Added Bridge.Onramp.prepare and Bridge.Onramp.status functions
-
-  ## Bridge.Onramp.prepare
-
-  Prepares an onramp transaction, returning a link from the specified provider to onramp to the specified token.
-
-  ```typescript
-  import { Bridge } from "thirdweb";
-  import { ethereum } from "thirdweb/chains";
-  import { NATIVE_TOKEN_ADDRESS, toWei } from "thirdweb/utils";
-
-  const preparedOnramp = await Bridge.Onramp.prepare({
-    client: thirdwebClient,
-    onramp: "stripe",
-    chainId: ethereum.id,
-    tokenAddress: NATIVE_TOKEN_ADDRESS,
-    receiver: "0x...", // receiver's address
-    amount: toWei("10"), // 10 of the destination token
-    // Optional params:
-    // sender: "0x...", // sender's address
-    // onrampTokenAddress: NATIVE_TOKEN_ADDRESS, // token to initially onramp to
-    // onrampChainId: 1, // chain to initially onramp to
-    // currency: "USD",
-    // maxSteps: 2,
-    // purchaseData: { customId: "123" }
-  });
-
-  console.log(preparedOnramp.link); // URL to redirect the user to
-  console.log(preparedOnramp.currencyAmount); // Price in fiat currency
-  ```
-
-  ## Bridge.Onramp.status
-
-  Retrieves the status of an Onramp session created via Bridge.Onramp.prepare.
-
-  ```typescript
-  import { Bridge } from "thirdweb";
-
-  const onrampStatus = await Bridge.Onramp.status({
-    id: "022218cc-96af-4291-b90c-dadcb47571ec",
-    client: thirdwebClient,
-  });
-
-  // Possible results:
-  // {
-  //   status: "CREATED",
-  //   transactions: [],
-  //   purchaseData: {
-  //     orderId: "abc-123",
-  //   },
-  // }
-  //
-  // or
-  // {
-  //   status: "PENDING",
-  //   transactions: [],
-  //   purchaseData: {
-  //     orderId: "abc-123",
-  //   },
-  // }
-  //
-  // or
-  // {
-  //   status: "COMPLETED",
-  //   transactions: [
-  //     {
-  //       chainId: 1,
-  //       transactionHash: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
-  //     },
-  //   ],
-  //   purchaseData: {
-  //     orderId: "abc-123",
-  //   },
-  // }
-  ```
🤖 Prompt for AI Agents
In packages/thirdweb/CHANGELOG.md from lines 170 to 244, remove the entire
section documenting the Bridge.Onramp module, including the prepare and status
function descriptions and example code, to align with the PR objectives of
removing Bridge.Transfer and Bridge.Onramp documentation from the changelog.

Comment on lines +7 to +164
to: "0x...",
value: 10000026098875381n,
data: "0x...",
chainId: 1,
type: "eip1559"
}
]
}
],
expiration: 1741730936680,
intent: {
chainId: 1,
tokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
amount: 10000000000000000n,
sender: "0x...",
receiver: "0x..."
}
}
```

## Sending the transactions

The `transactions` array is a series of [ox](https://oxlib.sh) EIP-1559 transactions that must be executed one after the other in order to fulfill the complete route. There are a few things to keep in mind when executing these transactions:

- Approvals will have the `approval` action specified. You can perform approvals with `sendAndConfirmTransaction`, then proceed to the next transaction.
- All transactions are assumed to be executed by the `sender` address, regardless of which chain they are on. The final transaction will use the `receiver` as the recipient address.
- If an `expiration` timestamp is provided, all transactions must be executed before that time to guarantee successful execution at the specified price.

NOTE: To get the status of each non-approval transaction, use `Bridge.status` rather than checking for transaction inclusion. This function will ensure full completion of the transfer.

You can include arbitrary data to be included on any webhooks and status responses with the `purchaseData` option:

```ts
const quote = await Bridge.Transfer.prepare({
chainId: 1,
tokenAddress: NATIVE_TOKEN_ADDRESS,
amount: toWei("0.01"),
sender: "0x...",
receiver: "0x...",
purchaseData: {
reference: "payment-123",
metadata: {
note: "Transfer to Alice",
},
},
client: thirdwebClient,
});
```

## Fees

There may be fees associated with the transfer. These fees are paid by the `feePayer` address, which defaults to the `sender` address. You can specify a different address with the `feePayer` option. If you do not specify an option or explicitly specify `sender`, the fees will be added to the input amount. If you specify the `receiver` as the fee payer the fees will be subtracted from the destination amount.

For example, if you were to request a transfer with `feePayer` set to `receiver`:

```typescript
const quote = await Bridge.Transfer.prepare({
chainId: 1,
tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
amount: 100_000_000n, // 100 USDC
sender: "0x...",
receiver: "0x...",
feePayer: "receiver",
client: thirdwebClient,
});
```

The returned quote might look like:

```typescript
{
originAmount: 100_000_000n, // 100 USDC
destinationAmount: 99_970_000n, // 99.97 USDC
...
}
```

If you were to request a transfer with `feePayer` set to `sender`:

```typescript
const quote = await Bridge.Transfer.prepare({
chainId: 1,
tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
amount: 100_000_000n, // 100 USDC
sender: "0x...",
receiver: "0x...",
feePayer: "sender",
client: thirdwebClient,
});
```

The returned quote might look like:

```typescript
{
originAmount: 100_030_000n, // 100.03 USDC
destinationAmount: 100_000_000n, // 100 USDC
...
}
```
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

This Bridge.Transfer module documentation should be removed as per PR objectives.

According to the AI summary, this PR is specifically removing documentation for the Bridge.Transfer and Bridge.Onramp modules from the changelog. This entire section documenting the Bridge.Transfer module (including all code examples and explanations) should be removed.

-### Minor Changes
-
-- [#7064](https://github.com/thirdweb-dev/js/pull/7064) [`64964da`](https://github.com/thirdweb-dev/js/commit/64964da22e11d4a40696d4c0aecb69f74c67fff8) Thanks [@gregfromstl](https://github.com/gregfromstl)! - Adds Bridge.Transfer module for direct token transfers:
-
-  ```typescript
-  import { Bridge, NATIVE_TOKEN_ADDRESS } from "thirdweb";
-
-  const quote = await Bridge.Transfer.prepare({
-    chainId: 1,
-    tokenAddress: NATIVE_TOKEN_ADDRESS,
-    amount: toWei("0.01"),
-    sender: "0x...",
-    receiver: "0x...",
-    client: thirdwebClient,
-  });
-  ```
-
-  This will return a quote that might look like:
-
-  ```typescript
-  {
-    originAmount: 10000026098875381n,
-    destinationAmount: 10000000000000000n,
-    blockNumber: 22026509n,
-    timestamp: 1741730936680,
-    estimatedExecutionTimeMs: 1000
-    steps: [
-      {
-        originToken: {
-          chainId: 1,
-          address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
-          symbol: "ETH",
-          name: "Ethereum",
-          decimals: 18,
-          priceUsd: 2000,
-          iconUri: "https://..."
-        },
-        destinationToken: {
-          chainId: 1,
-          address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
-          symbol: "ETH",
-          name: "Ethereum",
-          decimals: 18,
-          priceUsd: 2000,
-          iconUri: "https://..."
-        },
-        originAmount: 10000026098875381n,
-        destinationAmount: 10000000000000000n,
-        estimatedExecutionTimeMs: 1000
-        transactions: [
-          {
-            action: "approval",
-            id: "0x",
-            to: "0x...",
-            data: "0x...",
-            chainId: 1,
-            type: "eip1559"
-          },
-          {
-            action: "transfer",
-            to: "0x...",
-            value: 10000026098875381n,
-            data: "0x...",
-            chainId: 1,
-            type: "eip1559"
-          }
-        ]
-      }
-    ],
-    expiration: 1741730936680,
-    intent: {
-      chainId: 1,
-      tokenAddress: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
-      amount: 10000000000000000n,
-      sender: "0x...",
-      receiver: "0x..."
-    }
-  }
-  ```
-
-  ## Sending the transactions
-
-  The `transactions` array is a series of [ox](https://oxlib.sh) EIP-1559 transactions that must be executed one after the other in order to fulfill the complete route. There are a few things to keep in mind when executing these transactions:
-
-  - Approvals will have the `approval` action specified. You can perform approvals with `sendAndConfirmTransaction`, then proceed to the next transaction.
-  - All transactions are assumed to be executed by the `sender` address, regardless of which chain they are on. The final transaction will use the `receiver` as the recipient address.
-  - If an `expiration` timestamp is provided, all transactions must be executed before that time to guarantee successful execution at the specified price.
-
-  NOTE: To get the status of each non-approval transaction, use `Bridge.status` rather than checking for transaction inclusion. This function will ensure full completion of the transfer.
-
-  You can include arbitrary data to be included on any webhooks and status responses with the `purchaseData` option:
-
-  ```ts
-  const quote = await Bridge.Transfer.prepare({
-    chainId: 1,
-    tokenAddress: NATIVE_TOKEN_ADDRESS,
-    amount: toWei("0.01"),
-    sender: "0x...",
-    receiver: "0x...",
-    purchaseData: {
-      reference: "payment-123",
-      metadata: {
-        note: "Transfer to Alice",
-      },
-    },
-    client: thirdwebClient,
-  });
-  ```
-
-  ## Fees
-
-  There may be fees associated with the transfer. These fees are paid by the `feePayer` address, which defaults to the `sender` address. You can specify a different address with the `feePayer` option. If you do not specify an option or explicitly specify `sender`, the fees will be added to the input amount. If you specify the `receiver` as the fee payer the fees will be subtracted from the destination amount.
-
-  For example, if you were to request a transfer with `feePayer` set to `receiver`:
-
-  ```typescript
-  const quote = await Bridge.Transfer.prepare({
-    chainId: 1,
-    tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
-    amount: 100_000_000n, // 100 USDC
-    sender: "0x...",
-    receiver: "0x...",
-    feePayer: "receiver",
-    client: thirdwebClient,
-  });
-  ```
-
-  The returned quote might look like:
-
-  ```typescript
-  {
-    originAmount: 100_000_000n, // 100 USDC
-    destinationAmount: 99_970_000n, // 99.97 USDC
-    ...
-  }
-  ```
-
-  If you were to request a transfer with `feePayer` set to `sender`:
-
-  ```typescript
-  const quote = await Bridge.Transfer.prepare({
-    chainId: 1,
-    tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC
-    amount: 100_000_000n, // 100 USDC
-    sender: "0x...",
-    receiver: "0x...",
-    feePayer: "sender",
-    client: thirdwebClient,
-  });
-  ```
-
-  The returned quote might look like:
-
-  ```typescript
-  {
-    originAmount: 100_030_000n, // 100.03 USDC
-    destinationAmount: 100_000_000n, // 100 USDC
-    ...
-  }
-  ```
🤖 Prompt for AI Agents
In packages/thirdweb/CHANGELOG.md from lines 7 to 164, remove the entire
Bridge.Transfer module documentation section including all code examples,
explanations, and notes as this documentation is no longer relevant and should
be deleted according to the PR objectives.

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.

1 participant