Skip to content

Conversation

@joaquim-verges
Copy link
Member

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

Problem solved

Fixes CNCT-2146


PR-Codex overview

This PR adds support for singlePhaseDrop functionality in the thirdweb SDK, allowing users to set claim conditions and claim tokens in a single phase for custom drop contracts.

Detailed summary

  • Introduced singlePhaseDrop option in setClaimConditions and claimTo functions.
  • Updated related types and functions across ERC20, ERC721, and ERC1155 extensions.
  • Added examples and documentation for using singlePhaseDrop.
  • Modified event handling for ClaimConditionUpdated and TokensClaimed.
  • Updated test cases for CustomDropERC20 and CustomDropERC1155 to validate new functionality.

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2024

🦋 Changeset detected

Latest commit: 22df316

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

@vercel
Copy link

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 31, 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 31, 2024 01:26
Copy link
Member Author

joaquim-verges commented Oct 31, 2024

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

@linear
Copy link

linear bot commented Oct 31, 2024

@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 861 ms (0%) 540 ms (+35.57% 🔺) 1.4 s
thirdweb (cjs) 102.91 KB (0%) 2.1 s (0%) 808 ms (-10.15% 🔽) 2.9 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 71 ms (+236.54% 🔺) 168 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 99 ms (+894.57% 🔺) 109 ms
thirdweb/react (minimal + tree-shaking) 17.38 KB (0%) 348 ms (0%) 126 ms (+26.6% 🔺) 474 ms

@codecov
Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 82.05128% with 14 lines in your changes missing coverage. Please review.

Project coverage is 45.32%. Comparing base (7e1cb6d) to head (22df316).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...multicall-set-claim-claim-conditon-transactions.ts 85.00% 6 Missing ⚠️
...dweb/src/extensions/erc1155/drops/write/claimTo.ts 33.33% 2 Missing ⚠️
...tensions/erc1155/drops/write/setClaimConditions.ts 33.33% 2 Missing ⚠️
...rdweb/src/extensions/erc721/drops/write/claimTo.ts 50.00% 2 Missing ⚠️
...xtensions/erc721/drops/write/setClaimConditions.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5244      +/-   ##
==========================================
+ Coverage   45.29%   45.32%   +0.03%     
==========================================
  Files        1067     1067              
  Lines       55374    55433      +59     
  Branches     3978     3990      +12     
==========================================
+ Hits        25081    25126      +45     
- Misses      29601    29615      +14     
  Partials      692      692              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 7e1cb6d
packages 40.35% <82.05%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
...irdweb/src/extensions/erc20/drops/write/claimTo.ts 80.00% <100.00%> (+0.58%) ⬆️
...extensions/erc20/drops/write/setClaimConditions.ts 74.07% <100.00%> (+0.99%) ⬆️
...web/src/utils/extensions/drops/get-claim-params.ts 91.73% <100.00%> (+1.83%) ⬆️
...dweb/src/extensions/erc1155/drops/write/claimTo.ts 75.86% <33.33%> (-1.92%) ⬇️
...tensions/erc1155/drops/write/setClaimConditions.ts 75.00% <33.33%> (-1.93%) ⬇️
...rdweb/src/extensions/erc721/drops/write/claimTo.ts 90.90% <50.00%> (-9.10%) ⬇️
...xtensions/erc721/drops/write/setClaimConditions.ts 74.07% <33.33%> (-1.93%) ⬇️
...multicall-set-claim-claim-conditon-transactions.ts 88.42% <85.00%> (-3.06%) ⬇️

... and 3 files with indirect coverage changes

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