Skip to content

Conversation

@kumaryash90
Copy link
Member

@kumaryash90 kumaryash90 commented Apr 7, 2025


PR-Codex overview

This PR introduces support for contracts with zero fees by adding new metadata properties and configurations. It modifies the deployment forms to handle both fee and no-fee contracts, ensuring that the fee structure is applied correctly based on the contract version and chain.

Detailed summary

  • Added contractMetadataNoFee prop to DeployFormForUri.
  • Introduced ZERO_FEE_VERSIONS and ZERO_FEE_CHAINS constants in fee-config.ts.
  • Updated DeployFormForUriProps to include contractMetadataNoFee.
  • Modified DeployFormForUri to fetch and use contractMetadataNoFee.
  • Enhanced DeployFormForPublishInfo to find and handle no-fee versions.
  • Adjusted CustomContractForm to utilize metadataNoFee when applicable.
  • Updated fee logic to check against ZERO_FEE_CHAINS for fee exemptions.

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

@kumaryash90 kumaryash90 requested review from a team as code owners April 7, 2025 19:46
@changeset-bot
Copy link

changeset-bot bot commented Apr 7, 2025

⚠️ No Changeset found

Latest commit: a230532

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

@vercel
Copy link

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

@graphite-app
Copy link
Contributor

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

@github-actions github-actions bot added the Dashboard Involves changes to the Dashboard. label Apr 7, 2025
@kumaryash90 kumaryash90 added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Apr 7, 2025
@codecov
Copy link

codecov bot commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.04%. Comparing base (60235ad) to head (a230532).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6667      +/-   ##
==========================================
- Coverage   55.05%   55.04%   -0.01%     
==========================================
  Files         889      889              
  Lines       55858    55862       +4     
  Branches     3823     3824       +1     
==========================================
+ Hits        30751    30752       +1     
- Misses      25012    25016       +4     
+ Partials       95       94       -1     
Flag Coverage Δ
packages 55.04% <100.00%> (-0.01%) ⬇️
Files with missing lines Coverage Δ
.../src/contract/deployment/zksync/implementations.ts 100.00% <100.00%> (ø)

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 7, 2025

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.67 KB (0%) 954 ms (0%) 160 ms (+166.92% 🔺) 1.2 s
thirdweb (cjs) 129.82 KB (0%) 2.6 s (0%) 232 ms (+39.58% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 5.62 KB (0%) 113 ms (0%) 94 ms (+1927.77% 🔺) 207 ms
thirdweb/chains (tree-shaking) 514 B (0%) 11 ms (0%) 31 ms (+471.87% 🔺) 41 ms
thirdweb/react (minimal + tree-shaking) 19.36 KB (0%) 388 ms (0%) 109 ms (+620.91% 🔺) 496 ms

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 7, 2025 20:55 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 7, 2025 20:55 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 7, 2025 20:55 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 7, 2025 20:55 Inactive
@vercel vercel bot temporarily deployed to Preview – login April 7, 2025 20:56 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground April 7, 2025 20:56 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 7, 2025 20:56 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui April 7, 2025 20:56 Inactive
@kumaryash90 kumaryash90 removed the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Apr 7, 2025
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Apr 7, 2025
@vercel vercel bot temporarily deployed to Preview – docs-v2 April 8, 2025 20:14 Inactive
// force `ipfs://` prefix
uri: publishedContractNoFee?.publishMetadataUri.startsWith("ipfs://")
? publishedContractNoFee.publishMetadataUri
: `ipfs://${publishedContractNoFee?.publishMetadataUri}`,
Copy link
Member

Choose a reason for hiding this comment

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

this looks wrong? you're fetching the same thing twice

Copy link
Member Author

@kumaryash90 kumaryash90 Apr 9, 2025

Choose a reason for hiding this comment

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

this second one is the hardcoded version metadata for specific cases.

first one is latest or given version metadata, as default.

@kumaryash90 kumaryash90 added the merge-queue Adds the pull request to Graphite's merge queue. label Apr 9, 2025
Copy link
Member Author

kumaryash90 commented Apr 9, 2025

Merge activity

<!--

## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"

If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000):

## Notes for the reviewer

Anything important to call out? Be sure to also clarify these in your comments.

## How to test

Unit tests, playground, etc.

-->

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces support for contracts that have no fees by adding new properties and constants to handle fee exemption logic. It modifies several components to utilize the new metadata and fee configurations, ensuring that contracts can be deployed without fees based on specific versions and chains.

### Detailed summary
- Added `contractMetadataNoFee` prop to `DeployFormForUri` and `CustomContractForm`.
- Introduced `ZERO_FEE_VERSIONS` and `ZERO_FEE_CHAINS` constants in `fee-config.ts`.
- Updated `DeployFormForPublishInfo` to fetch metadata for contracts without fees.
- Adjusted fee logic in `CustomContractForm` to use `ZERO_FEE_CHAINS`.
- Modified deployment logic to conditionally use fee-exempt 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. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants