Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Apr 13, 2025


PR-Codex overview

This PR adds retry logic to the predictAccountAddress function, enhancing its reliability by implementing an exponential backoff strategy for handling errors during contract calls.

Detailed summary

  • Added retry logic to the predictAccountAddress function in packages/thirdweb/src/wallets/smart/lib/calls.ts.
  • Implemented a maximum of 3 retries with exponential backoff for contract calls.
  • Introduced error handling to throw an error if no address is found after retries.

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

@vercel
Copy link

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

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 13, 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.

@joaquim-verges joaquim-verges marked this pull request as ready for review April 13, 2025 22:03
@joaquim-verges joaquim-verges requested review from a team as code owners April 13, 2025 22:03
@joaquim-verges joaquim-verges changed the title [Smart Wallet] Add retry logic to predictAccountAddress [SDK] Add retry logic to predictAccountAddress Apr 13, 2025
@joaquim-verges joaquim-verges force-pushed the _Smart_Wallet_Add_retry_logic_to_predictAccountAddress branch from e367a97 to bdf0075 Compare April 13, 2025 22:04
@changeset-bot
Copy link

changeset-bot bot commented Apr 13, 2025

🦋 Changeset detected

Latest commit: e32dede

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 13, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.67 KB (0%) 954 ms (0%) 210 ms (+128.78% 🔺) 1.2 s
thirdweb (cjs) 130.06 KB (+0.01% 🔺) 2.7 s (+0.01% 🔺) 296 ms (+24.78% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 5.62 KB (0%) 113 ms (0%) 76 ms (+1047.13% 🔺) 189 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 84 ms (+1643.76% 🔺) 94 ms
thirdweb/react (minimal + tree-shaking) 19.36 KB (0%) 388 ms (0%) 111 ms (+491.85% 🔺) 498 ms

@codecov
Copy link

codecov bot commented Apr 13, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 55.02%. Comparing base (af09576) to head (e32dede).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/smart/lib/calls.ts 50.00% 13 Missing ⚠️

❌ Your patch status has failed because the patch coverage (50.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    #6707      +/-   ##
==========================================
- Coverage   55.04%   55.02%   -0.02%     
==========================================
  Files         889      889              
  Lines       55870    55889      +19     
  Branches     3820     3821       +1     
==========================================
+ Hits        30753    30754       +1     
- Misses      25023    25040      +17     
- Partials       94       95       +1     
Flag Coverage Δ
packages 55.02% <50.00%> (-0.02%) ⬇️
Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/smart/lib/calls.ts 79.25% <50.00%> (-7.59%) ⬇️

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

@joaquim-verges joaquim-verges merged commit fa0d114 into main Apr 13, 2025
32 of 33 checks passed
@joaquim-verges joaquim-verges deleted the _Smart_Wallet_Add_retry_logic_to_predictAccountAddress branch April 13, 2025 22:31
@joaquim-verges joaquim-verges mentioned this pull request Apr 13, 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