Skip to content

Version Packages #6820

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
Apr 24, 2025
Merged

Version Packages #6820

merged 1 commit into from
Apr 24, 2025

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 23, 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

  • #6830 e526f75 Thanks @gregfromstl! - Enhanced SDK Bridge functionality with the following key updates:

    1. Breaking Change: Standardized parameter naming in bridge functions:

      • Changed buyAmountWei to amount in Buy functions
      • Changed sellAmountWei to amount in Sell functions

      Example:

      // Before
      const buyQuote = await buy.quote({
        originChainId: 1,
        originTokenAddress: NATIVE_TOKEN_ADDRESS,
        destinationChainId: 10,
        destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
        buyAmountWei: toWei("0.01"),
        client: thirdwebClient,
      });
      
      // After
      const buyQuote = await buy.quote({
        originChainId: 1,
        originTokenAddress: NATIVE_TOKEN_ADDRESS,
        destinationChainId: 10,
        destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
        amount: toWei("0.01"),
        client: thirdwebClient,
      });
    2. Enhanced Quote Structure: Added steps array to buy/sell quote responses with detailed token information:

      // Steps contains detailed information about each step in a cross-chain transaction
      steps: [
        {
          originToken: {
            chainId: 1,
            address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            symbol: "ETH",
            name: "Ethereum",
            decimals: 18,
            priceUsd: 2000,
            iconUri: "https://...",
          },
          destinationToken: {
            chainId: 10,
            address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
            symbol: "ETH",
            name: "Ethereum",
            decimals: 18,
            priceUsd: 2000,
            iconUri: "https://...",
          },
          originAmount: 1000000000000000000n,
          destinationAmount: 9980000000000000000n,
          estimatedExecutionTimeMs: 1000,
          transactions: [
            /* transactions for this step */
          ],
        },
      ];
    3. Added Purchase Data Support: Added optional purchaseData parameter to Buy and Sell functions:

      // Example with purchaseData
      const quote = await buy.prepare({
        originChainId: 1,
        originTokenAddress: NATIVE_TOKEN_ADDRESS,
        destinationChainId: 10,
        destinationTokenAddress: NATIVE_TOKEN_ADDRESS,
        amount: toWei("0.01"),
        sender: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",
        receiver: "0x2a4f24F935Eb178e3e7BA9B53A5Ee6d8407C0709",
        purchaseData: {
          foo: "bar",
        },
        client: thirdwebClient,
      });
    4. Enhanced Status Responses: Status responses now include the purchaseData field that was provided during the initial transaction:

      // Status response includes purchaseData
      {
        status: "COMPLETED",
        // ...other status fields
        purchaseData: {
          foo: "bar"
        }
      }
    5. Updated API Interactions: Changed from query parameters to JSON body for prepare functions to accommodate complex data.

Patch Changes

@thirdweb-dev/[email protected]


PR-Codex overview

This PR focuses on updating the version numbers for the @thirdweb-dev/wagmi-adapter and thirdweb packages, along with significant enhancements to the SDK Bridge functionality, including standardized parameter naming and improved quote structures.

Detailed summary

  • Bump @thirdweb-dev/wagmi-adapter version to 0.2.60.
  • Bump thirdweb version to 5.96.0.
  • Standardize parameter naming in bridge functions (buyAmountWei to amount).
  • Add steps array to buy/sell quote responses.
  • Introduce optional purchaseData parameter in Buy/Sell functions.
  • Enhance status responses to include purchaseData.
  • Update API interactions to use JSON body instead of query parameters.

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

@joaquim-verges joaquim-verges requested review from a team as code owners April 23, 2025 04:05
Copy link

vercel bot commented Apr 23, 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 Apr 23, 2025 11:45pm
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 11:45pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 11:45pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 11:45pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2025 11:45pm

Copy link
Contributor

graphite-app bot commented Apr 23, 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.

Copy link
Contributor

github-actions bot commented Apr 23, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 51.16 KB (0%) 1.1 s (0%) 130 ms (+253.69% 🔺) 1.2 s
thirdweb (cjs) 143.77 KB (0%) 2.9 s (0%) 187 ms (+105.22% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 5.66 KB (0%) 114 ms (0%) 44 ms (+880.29% 🔺) 157 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 28 ms (+3798.6% 🔺) 38 ms
thirdweb/react (minimal + tree-shaking) 19.33 KB (0%) 387 ms (0%) 80 ms (+900.97% 🔺) 466 ms

Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.23%. Comparing base (33666aa) to head (2148f48).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6820      +/-   ##
==========================================
+ Coverage   55.22%   55.23%   +0.01%     
==========================================
  Files         896      896              
  Lines       57020    57020              
  Branches     3951     3955       +4     
==========================================
+ Hits        31487    31497      +10     
+ Misses      25436    25427       -9     
+ Partials       97       96       -1     
Flag Coverage Δ
packages 55.23% <ø> (+0.01%) ⬆️

see 4 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.

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