Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Oct 22, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on optimizing the mintAdditionalSupplyToBatch extension in the thirdweb library by introducing a new function to batch minting requests that share the same to address and tokenId, improving efficiency.

Detailed summary

  • Added WithOverrides type to MintAdditionalSupplyToBatchParams.
  • Introduced optimizeMintBatchContent function to batch minting requests.
  • Updated mintAdditionalSupplyToBatch to utilize the new optimization.
  • Added a test for optimizeMintBatchContent.
  • Modified test cases to reflect changes in minting logic.

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

@vercel
Copy link

vercel bot commented Oct 22, 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 Oct 23, 2024 3:21am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 3:21am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 3:21am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 3:21am

@changeset-bot
Copy link

changeset-bot bot commented Oct 22, 2024

🦋 Changeset detected

Latest commit: d522343

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

@graphite-app
Copy link
Contributor

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

@kien-ngo kien-ngo marked this pull request as ready for review October 22, 2024 10:56
Copy link
Contributor Author

kien-ngo commented Oct 22, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @kien-ngo and the rest of your teammates on Graphite Graphite

@github-actions
Copy link
Contributor

github-actions bot commented Oct 22, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.81 KB (0%) 857 ms (0%) 310 ms (+11.43% 🔺) 1.2 s
thirdweb (cjs) 102.66 KB (0%) 2.1 s (0%) 567 ms (-12.78% 🔽) 2.7 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 114 ms (+723.05% 🔺) 211 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 85 ms (+493.34% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 17.33 KB (0%) 347 ms (0%) 260 ms (+710.51% 🔺) 606 ms

@codecov
Copy link

codecov bot commented Oct 22, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.38%. Comparing base (4f22e2b) to head (d522343).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...sions/erc1155/write/mintAdditionalSupplyToBatch.ts 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5125      +/-   ##
==========================================
+ Coverage   45.34%   45.38%   +0.03%     
==========================================
  Files        1064     1064              
  Lines       55030    55054      +24     
  Branches     3965     3965              
==========================================
+ Hits        24954    24986      +32     
+ Misses      29384    29376       -8     
  Partials      692      692              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4f22e2b
packages 40.38% <96.00%> (+0.05%) ⬆️

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

Files with missing lines Coverage Δ
...sions/erc1155/write/mintAdditionalSupplyToBatch.ts 97.95% <96.00%> (-2.05%) ⬇️

... and 3 files with indirect coverage changes

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Oct 22, 2024
Copy link
Contributor

gregfromstl commented Oct 22, 2024

Merge activity

  • Oct 22, 5:14 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 22, 11:15 PM EDT: A user added this pull request to the Graphite merge queue.
  • Oct 22, 11:18 PM EDT: A user merged this pull request with the Graphite merge queue.

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on optimizing the `mintAdditionalSupplyToBatch` extension by introducing a new function to batch minting requests that share the same recipient and token ID, reducing the number of transactions required.

### Detailed summary
- Added `WithOverrides` to `MintAdditionalSupplyToBatchParams`.
- Implemented `optimizeMintBatchContent` function to consolidate minting requests.
- Updated `mintAdditionalSupplyToBatch` to use optimized NFT data.
- Added a test for `optimizeMintBatchContent` to verify its functionality.

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

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.

3 participants