Skip to content

Conversation

@joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Feb 26, 2025


PR-Codex overview

This PR focuses on updating the caching strategy for resolving contract ABIs in the resolve-abi.ts file and modifying the CI workflow to run on a different Ubuntu version.

Detailed summary

  • Updated the runs-on parameter in .github/workflows/CI.yml from ubuntu-latest to ubuntu-latest-8 across multiple jobs.
  • Introduced withCache for caching in the resolveContractAbi function in packages/thirdweb/src/contract/actions/resolve-abi.ts.
  • Removed the previous ABI_RESOLUTION_CACHE implementation.

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

@vercel
Copy link

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

@changeset-bot
Copy link

changeset-bot bot commented Feb 26, 2025

🦋 Changeset detected

Latest commit: cf2fa98

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 github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Feb 26, 2025
@joaquim-verges joaquim-verges changed the title [thirdweb] fix: Update contract ABI caching strategy [sdk] fix: Update contract ABI caching strategy Feb 26, 2025
Copy link
Member Author

joaquim-verges commented Feb 26, 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.

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 February 26, 2025 23:40
@joaquim-verges joaquim-verges requested review from a team as code owners February 26, 2025 23:40
@joaquim-verges joaquim-verges changed the title [sdk] fix: Update contract ABI caching strategy [SDK] fix: Update contract ABI caching strategy Feb 26, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Feb 26, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 46.64 KB (+0.16% 🔺) 933 ms (+0.16% 🔺) 157 ms (+193.27% 🔺) 1.1 s
thirdweb (cjs) 124.56 KB (+0.12% 🔺) 2.5 s (+0.12% 🔺) 220 ms (+45.05% 🔺) 2.8 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 112 ms (0%) 62 ms (+1294.85% 🔺) 174 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 29 ms (+1464.58% 🔺) 39 ms
thirdweb/react (minimal + tree-shaking) 19.35 KB (0%) 387 ms (0%) 61 ms (+387.44% 🔺) 448 ms

Comment on lines +48 to +51
return (await resolveAbiFromContractApi(
contract,
contractApiBaseUrl,
)) as abi;
Copy link
Contributor

Choose a reason for hiding this comment

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

Network requests should be wrapped with timeout and proper error handling, and the AbortSignal should be passed to the fetch calls. The withCache utility should also handle request cancellation properly.

Spotted by Graphite Reviewer (based on CI logs)

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

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.

3 participants