Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented May 15, 2025


PR-Codex overview

This PR introduces a new Transfer module for direct token transfers within the thirdweb SDK, enhancing the bridge functionality. It includes new methods for preparing transfer quotes and adds testing for the transfer functionality.

Detailed summary

  • Added Transfer export in packages/thirdweb/src/bridge/index.ts.
  • Created Transfer module with the prepare method for token transfers.
  • Updated Buy and Sell modules to include amount in transaction requests.
  • Modified getBuyWithCryptoTransfer and getBuyWithCryptoQuote to utilize the new Transfer module.
  • Added tests for the Transfer functionality in packages/thirdweb/src/bridge/Transfer.test.ts.
  • Removed deprecated quote endpoint methods in packages/thirdweb/src/pay/utils/definitions.ts.
  • Updated transaction data handling in getTransfer.ts and getQuote.ts to reflect changes in the transfer logic.

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

gregfromstl and others added 2 commits May 15, 2025 14:24
- Changes the behavior of buyWithCrypto to use the Universal Bridge service instead of the legacy API
- Updates getQuote and getTransfer implementation to use Bridge.Buy and Bridge.Sell
- Adds a new Transfer module to the Bridge namespace for token transfers
- Removes the legacy API endpoints from definitions.ts

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
- Adds new Transfer module for direct token transfers
- Implements prepare function for getting transfer quotes and transactions
- Adds tests for the Transfer module

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
@gregfromstl gregfromstl requested review from a team as code owners May 15, 2025 21:26
@linear
Copy link

linear bot commented May 15, 2025

@vercel
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented May 15, 2025

🦋 Changeset detected

Latest commit: 2c33488

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

This PR includes changesets to release 2 packages
Name Type
thirdweb Minor
@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

@graphite-app
Copy link
Contributor

graphite-app bot commented May 15, 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.

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground May 15, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 May 15, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – login May 15, 2025 21:29 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui May 15, 2025 21:29 Inactive
@github-actions
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 54.95 KB (+1.43% 🔺) 1.1 s (+1.43% 🔺) 237 ms (+121.16% 🔺) 1.4 s
thirdweb (cjs) 303.72 KB (+56.8% 🔺) 6.1 s (+56.8% 🔺) 894 ms (+113% 🔺) 7 s
thirdweb (minimal + tree-shaking) 5.68 KB (0%) 114 ms (0%) 90 ms (+1314.27% 🔺) 203 ms
thirdweb/chains (tree-shaking) 524 B (0%) 11 ms (0%) 33 ms (+981.76% 🔺) 43 ms
thirdweb/react (minimal + tree-shaking) 19.53 KB (0%) 391 ms (0%) 78 ms (+385% 🔺) 469 ms

@codecov
Copy link

codecov bot commented May 15, 2025

Codecov Report

Attention: Patch coverage is 22.78820% with 288 lines in your changes missing coverage. Please review.

Project coverage is 55.36%. Comparing base (db53847) to head (2c33488).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ackages/thirdweb/src/pay/buyWithCrypto/getQuote.ts 2.79% 174 Missing ⚠️
...ages/thirdweb/src/pay/buyWithCrypto/getTransfer.ts 4.27% 112 Missing ⚠️
packages/thirdweb/src/bridge/Transfer.ts 97.01% 2 Missing ⚠️

❌ Your patch status has failed because the patch coverage (22.78%) 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    #7062      +/-   ##
==========================================
- Coverage   55.50%   55.36%   -0.15%     
==========================================
  Files         909      910       +1     
  Lines       58402    58682     +280     
  Branches     4070     4087      +17     
==========================================
+ Hits        32415    32488      +73     
- Misses      25882    26088     +206     
- Partials      105      106       +1     
Flag Coverage Δ
packages 55.36% <22.78%> (-0.15%) ⬇️
Files with missing lines Coverage Δ
packages/thirdweb/src/bridge/Buy.ts 96.63% <100.00%> (+0.11%) ⬆️
packages/thirdweb/src/bridge/Sell.ts 97.47% <100.00%> (+0.08%) ⬆️
packages/thirdweb/src/bridge/index.ts 100.00% <100.00%> (ø)
packages/thirdweb/src/pay/utils/definitions.ts 62.96% <ø> (+1.67%) ⬆️
...ges/thirdweb/src/utils/any-evm/zksync/constants.ts 100.00% <ø> (ø)
packages/thirdweb/src/bridge/Transfer.ts 97.01% <97.01%> (ø)
...ages/thirdweb/src/pay/buyWithCrypto/getTransfer.ts 4.41% <4.27%> (-2.74%) ⬇️
...ackages/thirdweb/src/pay/buyWithCrypto/getQuote.ts 2.98% <2.79%> (-2.50%) ⬇️

... and 5 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