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

optimize: improve mintAdditionalSupplyTo efficiency #5148

Merged

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Oct 23, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on optimizing the mintAdditionalSupplyTo function in the erc1155 extension of the thirdweb SDK by simplifying the handling of the token URI.

Detailed summary

  • Updated the mintAdditionalSupplyTo function to remove the retrieval of the existing token URI.
  • Set the uri field to an empty string, indicating that the contract will maintain the existing token URI.
  • Kept the parameters to, tokenId, and amount unchanged.

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

Copy link

changeset-bot bot commented Oct 23, 2024

🦋 Changeset detected

Latest commit: 2fdb69d

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

Copy link

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

Copy link

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

@joaquim-verges joaquim-verges marked this pull request as ready for review October 23, 2024 23:02
Copy link
Member Author

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

Join @joaquim-verges and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented Oct 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.9 KB (0%) 859 ms (0%) 314 ms (+103.49% 🔺) 1.2 s
thirdweb (cjs) 102.73 KB (0%) 2.1 s (0%) 349 ms (-8.2% 🔽) 2.5 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 66 ms (+370.76% 🔺) 162 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 85 ms (+2915.79% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 17.34 KB (0%) 347 ms (0%) 45 ms (+19.89% 🔺) 392 ms

@joaquim-verges joaquim-verges force-pushed the optimize_improve_mintAdditionalSupplyTo_efficiency branch from fd70dd6 to 772a0ad Compare October 24, 2024 08:09
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.42%. Comparing base (06c0cf3) to head (2fdb69d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5148   +/-   ##
=======================================
  Coverage   45.41%   45.42%           
=======================================
  Files        1065     1065           
  Lines       55149    55145    -4     
  Branches     3970     3970           
=======================================
+ Hits        25047    25049    +2     
+ Misses      29410    29404    -6     
  Partials      692      692           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 06c0cf3
packages 40.44% <100.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
...extensions/erc1155/write/mintAdditionalSupplyTo.ts 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

Copy link

graphite-app bot commented Oct 24, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on optimizing the `mintAdditionalSupplyTo` function in the `erc1155` extension by modifying how the token URI is handled during the minting process.

### Detailed summary
- Removed the retrieval of the existing token URI from the contract.
- Set the `uri` field to an empty string, indicating the contract will maintain the existing token URI.
- Kept the `to`, `tokenId`, and `amount` fields unchanged.

> ✨ 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants