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

Add ERC721 extension: updateMetadata & updateBatchBaseURI #3347

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Jun 17, 2024

PR-Codex overview

This PR adds an ERC721 extension updateMetadata for updating NFT metadata in a batch.

Detailed summary

  • Added updateMetadata function to update NFT metadata in ERC721 extension
  • Added getUpdateMetadataParams function to prepare update metadata parameters
  • Added tests for updateMetadata function with different scenarios
  • Added FreezeBatchBaseURIParams and related functions for freezing batch base URI

The following files were skipped due to too many changes: packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts, packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts, packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts

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

@kien-ngo kien-ngo added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Jun 17, 2024
@kien-ngo kien-ngo self-assigned this Jun 17, 2024
Copy link

linear bot commented Jun 17, 2024

Copy link

vercel bot commented Jun 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2024 7:23pm

Copy link

changeset-bot bot commented Jun 17, 2024

🦋 Changeset detected

Latest commit: a9ce10f

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

This PR includes changesets to release 8 packages
Name Type
thirdweb Patch
@thirdweb-dev/sdk Patch
@thirdweb-dev/cli Patch
@thirdweb-dev/react-core Patch
@thirdweb-dev/react Patch
@thirdweb-dev/unity-js-bridge Patch
@thirdweb-dev/wallets Patch
@thirdweb-dev/auth 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

graphite-app bot commented Jun 17, 2024

Your org requires 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

codspeed-hq bot commented Jun 17, 2024

CodSpeed Performance Report

Merging #3347 will not alter performance

Comparing kien/cnct-1376 (a9ce10f) with main (d2ad36d)

Summary

✅ 9 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jun 17, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 40.59 KB (0%) 812 ms (0%) 2.9 s (-2.07% 🔽) 3.7 s
thirdweb (cjs) 90.32 KB (0%) 1.9 s (0%) 7 s (-4.09% 🔽) 8.8 s
thirdweb (minimal + tree-shaking) 4.75 KB (0%) 95 ms (0%) 178 ms (-10.91% 🔽) 273 ms
thirdweb/chains (tree-shaking) 423 B (0%) 10 ms (0%) 139 ms (-74.59% 🔽) 149 ms
thirdweb/react (minimal + tree-shaking) 13.47 KB (0%) 270 ms (0%) 523 ms (+123.15% 🔺) 792 ms

@kien-ngo kien-ngo marked this pull request as ready for review June 17, 2024 06:54
Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 95.12195% with 6 lines in your changes missing coverage. Please review.

Project coverage is 62.89%. Comparing base (321cf26) to head (60743e2).

Current head 60743e2 differs from pull request most recent head a9ce10f

Please upload reports for the commit a9ce10f to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3347      +/-   ##
==========================================
+ Coverage   62.82%   62.89%   +0.07%     
==========================================
  Files         860      861       +1     
  Lines       63715    63838     +123     
  Branches     3449     3464      +15     
==========================================
+ Hits        40026    40151     +125     
+ Misses      23014    23010       -4     
- Partials      675      677       +2     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.60% <ø> (ø) Carriedforward from c447437
packages 62.33% <95.12%> (+0.09%) ⬆️

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

Files Coverage Δ
...rc/extensions/erc721/drops/write/updateMetadata.ts 95.12% <95.12%> (ø)

... and 2 files with indirect coverage changes

@kien-ngo kien-ngo removed the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Jun 17, 2024
@kien-ngo kien-ngo changed the title Add ERC721 extension: updateMetadata Add ERC721 extension: updateMetadata & updateBatchBaseURI Jun 17, 2024
Copy link
Member

@jnsdls jnsdls left a comment

Choose a reason for hiding this comment

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

LGTM

@kien-ngo kien-ngo added the merge-queue Adds the pull request to Graphite's merge queue. label Jun 17, 2024
Copy link

graphite-app bot commented Jun 17, 2024

Merge activity

  • Jun 17, 3:19 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jun 17, 3:19 PM EDT: kien-ngo added this pull request to the Graphite merge queue.
  • Jun 17, 3:21 PM EDT: kien-ngo merged this pull request with the Graphite merge queue.

<!-- start pr-codex -->

## PR-Codex overview
This PR adds an ERC721 extension `updateMetadata` for updating NFT metadata in batches.

### Detailed summary
- Added `updateMetadata` function to update NFT metadata
- Implemented `getUpdateMetadataParams` to prepare transaction
- Added tests for `updateMetadata` function
- Introduced `freezeBatchBaseURI` function and related utilities

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/freezeBatchBaseURI.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/setMaxTotalSupply.ts`, `packages/thirdweb/src/extensions/erc721/__generated__/DropERC721/write/updateBatchBaseURI.ts`

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

<!-- end pr-codex -->
@graphite-app graphite-app bot merged commit a9ce10f into main Jun 17, 2024
21 of 22 checks passed
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants