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

New zksolc metadata format #4568

Merged
merged 1 commit into from
Sep 26, 2024
Merged

New zksolc metadata format #4568

merged 1 commit into from
Sep 26, 2024

Conversation

kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented Sep 12, 2024

Problem solved

Handle new zksolc metadata format
ref: ipfs://QmS6ehXYWKJEJq3LBSfG2ujKPzQQJooNE7L375zyFbpxmw


PR-Codex overview

This PR introduces support for a new zksolc compiler type, enhancing the handling of zkSync metadata and related functionalities across various components in the thirdweb package.

Detailed summary

  • Added compilerType option to multiple functions and types.
  • Implemented handling for zksolc metadata format in fetchDeployMetadata.
  • Updated formatCompilerMetadata to process zksolc metadata.
  • Adjusted contract deployment and metadata fetching logic to accommodate zksolc.

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

Copy link

vercel bot commented Sep 12, 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 Sep 26, 2024 0:17am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 0:17am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 0:17am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 0:17am

Copy link

changeset-bot bot commented Sep 12, 2024

🦋 Changeset detected

Latest commit: 3f83a37

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

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

@vercel vercel bot temporarily deployed to Preview – wallet-ui September 12, 2024 21:42 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb-www September 12, 2024 21:42 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground September 12, 2024 21:42 Inactive
@kumaryash90 kumaryash90 marked this pull request as draft September 12, 2024 21:42
Copy link

graphite-app bot commented Sep 12, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link
Contributor

github-actions bot commented Sep 12, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.93 KB (0%) 839 ms (0%) 624 ms (+43.93% 🔺) 1.5 s
thirdweb (cjs) 101.55 KB (-0.01% 🔽) 2.1 s (-0.01% 🔽) 998 ms (-10.52% 🔽) 3.1 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 66 ms (+48.97% 🔺) 162 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 16 ms (-22.02% 🔽) 26 ms
thirdweb/react (minimal + tree-shaking) 16.78 KB (0%) 336 ms (0%) 182 ms (+50.72% 🔺) 518 ms

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 58.33333% with 30 lines in your changes missing coverage. Please review.

Project coverage is 49.14%. Comparing base (5ab3a81) to head (3f83a37).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...nsaction/actions/zksync/send-eip712-transaction.ts 4.76% 20 Missing ⚠️
...ages/thirdweb/src/utils/any-evm/deploy-metadata.ts 72.72% 6 Missing ⚠️
...thirdweb/src/contract/actions/compiler-metadata.ts 88.88% 2 Missing ⚠️
...hirdweb/src/contract/deployment/utils/bootstrap.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4568   +/-   ##
=======================================
  Coverage   49.13%   49.14%           
=======================================
  Files        1051     1051           
  Lines       56681    56711   +30     
  Branches     3889     3889           
=======================================
+ Hits        27850    27869   +19     
- Misses      28198    28209   +11     
  Partials      633      633           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 5ab3a81
packages 45.21% <58.33%> (+0.01%) ⬆️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...ages/thirdweb/src/contract/deployment/publisher.ts 80.76% <100.00%> (+0.16%) ⬆️
...rdweb/src/extensions/prebuilts/deploy-published.ts 81.88% <100.00%> (+0.36%) ⬆️
...thirdweb/src/contract/actions/compiler-metadata.ts 93.75% <88.88%> (-6.25%) ⬇️
...hirdweb/src/contract/deployment/utils/bootstrap.ts 76.15% <33.33%> (-0.36%) ⬇️
...ages/thirdweb/src/utils/any-evm/deploy-metadata.ts 84.37% <72.72%> (-4.09%) ⬇️
...nsaction/actions/zksync/send-eip712-transaction.ts 7.19% <4.76%> (-0.06%) ⬇️

... and 4 files with indirect coverage changes

Copy link

graphite-app bot commented Sep 26, 2024

Merge activity

  • Sep 25, 8:04 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 25, 8:12 PM EDT: kumaryash90 added this pull request to the Graphite merge queue.
  • Sep 25, 8:17 PM EDT: kumaryash90 merged this pull request with the Graphite merge queue.

## Problem solved

Handle new zksolc metadata format
ref: ipfs://QmS6ehXYWKJEJq3LBSfG2ujKPzQQJooNE7L375zyFbpxmw

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for a new `zksolc` metadata format in the `thirdweb` package, enhancing the handling of zkSync contracts by updating various functions and types to accommodate the new compiler type.

### Detailed summary
- Added `compilerType` option to several functions and types to support `solc` and `zksolc`.
- Updated `fetchPublishedContractMetadata` and `deployPublishedContract` to utilize `compilerType`.
- Enhanced `formatCompilerMetadata` to handle `zksolc` specific metadata.
- Modified `fetchDeployMetadata` to validate and fetch `zksolc` metadata correctly.
- Updated `CustomContractForm` to determine `compilerType` based on the active wallet chain.
- Improved error handling for missing `zksolc` metadata.

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

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dashboard Involves changes to the Dashboard. merge-queue Adds the pull request to Graphite's merge queue. packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants