Skip to content
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

[SDK] Refactor: Viem to Ox migration #5790

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

[SDK] Refactor: Viem to Ox migration #5790

wants to merge 4 commits into from

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Dec 18, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR primarily updates the imports across multiple files to replace instances of maxUint256 and various utility functions from viem with their counterparts from ox/Solidity and other ox modules, enhancing consistency and potentially improving functionality.

Detailed summary

  • Changed imports of maxUint256 from viem to ox/Solidity in several files.
  • Updated isErc6492Signature function to use ox__Hex.slice instead of a local sliceHex.
  • Modified create2FactoryAddress to use ox__ContractAddress.from.
  • Adjusted parseErc6492Signature to utilize ox__WrappedSignature.validate and ox__AbiParameters.decode.
  • Replaced encodePacked from viem with ox__AbiParameters.encodePacked.
  • Updated various functions to use ox__Hex utilities for hex manipulations.
  • Altered verifyTypedData to use ox__TypedData for type definitions.
  • Changed verifyEOASignature to utilize ox__Secp256k1.recoverAddress.
  • Updated verifyHash to replace signature handling with ox__Signature methods.
  • Adjusted encodeAbiParameters to use ox__Hex.concat instead of concat from viem/utils.

The following files were skipped due to too many changes: pnpm-lock.yaml

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

Copy link

vercel bot commented Dec 18, 2024

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 Dec 18, 2024 7:57am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 7:57am
thirdweb-www ❌ Failed (Inspect) Dec 18, 2024 7:57am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 7:57am

Copy link

graphite-app bot commented Dec 18, 2024

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

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: 45af357

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 18, 2024
Copy link
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.84 KB (+2% 🔺) 917 ms (+2% 🔺) 431 ms (-91% 🔽) 1.4 s
thirdweb (cjs) 114.03 KB (+2.88% 🔺) 2.3 s (+2.88% 🔺) 886 ms (-89.66% 🔽) 3.2 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 116 ms (-80.35% 🔽) 227 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 45 ms (-59.31% 🔽) 55 ms
thirdweb/react (minimal + tree-shaking) 19.1 KB (+0.14% 🔺) 382 ms (+0.14% 🔺) 188 ms (-79.2% 🔽) 570 ms

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.

1 participant