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

[Update] Refactor claim condition retrieval and add support check #4391

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Sep 4, 2024

PR-Codex overview

This PR enhances ERC721 Drop ClaimCondition functionality and adds support checks for claimTo, lazyMint, setClaimConditions, and resetClaimEligibility methods.

Detailed summary

  • Added claimCondition function to IDrop ABI
  • Renamed ADDRESS_ZERO constant to ZERO_ADDRESS
  • Added support checks for claimTo, lazyMint, setClaimConditions, and resetClaimEligibility methods
  • Updated function imports and added new functions for method support checks

The following files were skipped due to too many changes: packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts, packages/thirdweb/src/extensions/erc721/drops/read/getActiveClaimCondition.ts, packages/thirdweb/src/extensions/erc721/drops/read/getClaimConditions.ts, packages/thirdweb/src/extensions/erc721/drop721.test.ts

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

Copy link

vercel bot commented Sep 4, 2024

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

Name Status Preview Comments Updated (UTC)
docs-v2 🛑 Canceled (Inspect) Sep 4, 2024 11:39pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:39pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:39pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 4, 2024 11:39pm

Copy link

changeset-bot bot commented Sep 4, 2024

🦋 Changeset detected

Latest commit: f9c351c

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

This PR includes changesets to release 1 package
Name Type
thirdweb Minor

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

@jnsdls jnsdls marked this pull request as ready for review September 4, 2024 20:57
Copy link

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

@jnsdls jnsdls added the DO NOT MERGE This pull request is still in progress and is not ready to be merged. label Sep 4, 2024 — with Graphite App
Copy link
Contributor

github-actions bot commented Sep 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43.29 KB (0%) 866 ms (0%) 542 ms (+7.33% 🔺) 1.5 s
thirdweb (cjs) 100.65 KB (0%) 2.1 s (0%) 885 ms (-5.15% 🔽) 2.9 s
thirdweb (minimal + tree-shaking) 4.81 KB (0%) 97 ms (0%) 228 ms (+381.53% 🔺) 324 ms
thirdweb/chains (tree-shaking) 492 B (0%) 10 ms (0%) 24 ms (+287% 🔺) 34 ms
thirdweb/react (minimal + tree-shaking) 16.22 KB (0%) 325 ms (0%) 139 ms (+213.32% 🔺) 464 ms

Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 73.57143% with 74 lines in your changes missing coverage. Please review.

Project coverage is 59.98%. Comparing base (257e428) to head (f9c351c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...extensions/erc721/drops/read/getClaimConditions.ts 62.36% 35 Missing ⚠️
...sions/erc721/drops/read/getActiveClaimCondition.ts 59.37% 13 Missing ⚠️
...xtensions/erc721/drops/write/setClaimConditions.ts 70.00% 9 Missing ⚠️
...rdweb/src/extensions/erc721/drops/write/claimTo.ts 76.00% 6 Missing ⚠️
...s/thirdweb/src/extensions/erc721/write/lazyMint.ts 76.92% 6 Missing ⚠️
...nsions/erc721/drops/write/resetClaimEligibility.ts 92.85% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4391      +/-   ##
==========================================
+ Coverage   59.95%   59.98%   +0.03%     
==========================================
  Files         978      980       +2     
  Lines       79759    80024     +265     
  Branches     3630     3630              
==========================================
+ Hits        47818    48005     +187     
- Misses      31262    31340      +78     
  Partials      679      679              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 257e428
packages 59.09% <73.57%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
...web/src/utils/extensions/drops/get-claim-params.ts 100.00% <100.00%> (ø)
...nsions/erc721/drops/write/resetClaimEligibility.ts 92.85% <92.85%> (ø)
...rdweb/src/extensions/erc721/drops/write/claimTo.ts 91.66% <76.00%> (-8.34%) ⬇️
...s/thirdweb/src/extensions/erc721/write/lazyMint.ts 93.39% <76.92%> (-5.40%) ⬇️
...xtensions/erc721/drops/write/setClaimConditions.ts 89.41% <70.00%> (-10.59%) ⬇️
...sions/erc721/drops/read/getActiveClaimCondition.ts 69.76% <59.37%> (-6.90%) ⬇️
...extensions/erc721/drops/read/getClaimConditions.ts 62.36% <62.36%> (ø)

... and 3 files with indirect coverage changes

Copy link

graphite-app bot commented Sep 4, 2024

Merge activity

)

<!-- start pr-codex -->

## PR-Codex overview
This PR enhances ERC721 Drop ClaimCondition functionality by adding new methods and improving existing ones.

### Detailed summary
- Added `claimCondition` method to `IDrop.json`
- Updated `getClaimParams` in `get-claim-params.ts` to use `ZERO_ADDRESS`
- Added `isClaimToSupported` and `isLazyMintSupported` functions
- Updated `lazyMint` and `claimTo` functions
- Added support check functions for various methods

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getActiveClaimCondition.ts`, `packages/thirdweb/src/extensions/erc721/drops/read/getClaimConditions.ts`, `packages/thirdweb/src/extensions/erc721/drop721.test.ts`

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