Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented May 12, 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

  • #7003 58e343c Thanks @joaquim-verges! - Breaking change: EIP-5792 support

    We've significantly improved our EIP-5792 apis, which come with some breaking changes:

    New Functions Added

    1. useSendAndConfirmCalls

      • Description: Hook to send and wait for confirmation of EIP-5792 calls
      • Returns: React Query mutation object with transaction receipts
      • Example:
      const { mutate: sendAndConfirmCalls, data: result } =
        useSendAndConfirmCalls();
      await sendAndConfirmCalls({
        client,
        calls: [tx1, tx2],
      });
      console.log("Transaction hash:", result.receipts?.[0]?.transactionHash);
    2. useWaitForCallsReceipt

      • Description: Hook to wait for the receipt of EIP-5792 calls, perfect for splitting submitting the call and waiting for receipt
      • Returns: React Query object with call receipts
      • Example:
      const { mutate: sendCalls, data: result } = useSendCalls();
      const { data: receipt, isLoading } = useWaitForCallsReceipt(result);

    Breaking Changes

    useSendCalls Changes

    Before

    // mutation returns id a string
    const sendCalls = useSendCalls({ client });

    After

    // no longer needs client
    // mutation returns an object with id
    const sendCalls = useSendCalls();

    Waiting for call receipts is now done separately, via the useWaitForCallsReceipt.

    Before

    const { mutate: sendCalls, data: receipt } = useSendCalls({
      client,
      waitForBundle: true,
    });

    After

    const { mutate: sendCalls, data: result } = useSendCalls();
    const { data: receipt, isLoading } = useWaitForCallsReceipt(result);

    You can also use the helper useSendAndConfirmCalls to combine both submitting and waiting for confirmation.

    const { mutate: sendAndConfirmCalls, data: receipt } =
      useSendAndConfirmCalls();

    sendCalls Changes

    Before:

    // Old output type
    type SendCallsResult = string;

    After:

    // New output type
    type SendCallsResult = {
      id: string;
      client: ThirdwebClient;
      chain: Chain;
      wallet: Wallet;
    };

@thirdweb-dev/[email protected]


PR-Codex overview

This PR updates the versioning for thirdweb and @thirdweb-dev/wagmi-adapter, introduces new functions for EIP-5792 support, and outlines breaking changes in existing functions.

Detailed summary

  • Updated thirdweb version from 5.98.2 to 5.99.0
  • Updated @thirdweb-dev/wagmi-adapter version from 0.2.75 to 0.2.76
  • Added new functions:
    • useSendAndConfirmCalls
    • useWaitForCallsReceipt
  • Breaking changes for useSendCalls and sendCalls:
    • Simplified usage by removing the need for client
    • Changed output type for sendCalls from a string to an object

✨ 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 May 12, 2025 08:27
@vercel
Copy link

vercel bot commented May 12, 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 12, 2025 8:35am
login ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:35am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:35am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:35am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 8:35am

@graphite-app
Copy link
Contributor

graphite-app bot commented May 12, 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
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 54.21 KB (0%) 1.1 s (0%) 209 ms (+177.65% 🔺) 1.3 s
thirdweb (cjs) 193.92 KB (0%) 3.9 s (0%) 387 ms (+35.78% 🔺) 4.3 s
thirdweb (minimal + tree-shaking) 5.68 KB (0%) 114 ms (0%) 88 ms (+1658.53% 🔺) 202 ms
thirdweb/chains (tree-shaking) 524 B (0%) 11 ms (0%) 45 ms (+2484.44% 🔺) 55 ms
thirdweb/react (minimal + tree-shaking) 19.53 KB (0%) 391 ms (0%) 90 ms (+706.94% 🔺) 480 ms

@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.71%. Comparing base (58e343c) to head (40fbf91).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7014   +/-   ##
=======================================
  Coverage   54.71%   54.71%           
=======================================
  Files         904      904           
  Lines       57991    57991           
  Branches     4004     4004           
=======================================
  Hits        31731    31731           
  Misses      26155    26155           
  Partials      105      105           
Flag Coverage Δ
packages 54.71% <ø> (ø)
🚀 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