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

[SDK] Add Pack extensions #4579

Merged
merged 1 commit into from
Sep 28, 2024
Merged

[SDK] Add Pack extensions #4579

merged 1 commit into from
Sep 28, 2024

Conversation

kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Sep 13, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR introduces a new Pack extension to the thirdweb library, enhancing the deployment and management of pack contracts, including events, functions, and test cases for creating and handling packs.

Detailed summary

  • Added Pack.json and IPackVRFDirect.json ABIs.
  • Introduced deployPackContract, PackContractParams, and DeployPackContractOptions.
  • Implemented tests for deploying and interacting with Pack contracts.
  • Added functions for pack management (create, open, add contents).
  • Included new events related to pack actions (created, opened, updated).

The following files were skipped due to too many changes: packages/thirdweb/src/extensions/pack/createNewPack.test.ts, packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts, packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts, packages/thirdweb/src/extensions/pack/createNewPack.ts

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

Copy link

vercel bot commented Sep 13, 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 Sep 28, 2024 0:55am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 0:55am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 0:55am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2024 0:55am

Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: 90b5495

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

Copy link
Contributor

github-actions bot commented Sep 13, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.94 KB (0%) 839 ms (0%) 435 ms (+36.09% 🔺) 1.3 s
thirdweb (cjs) 101.6 KB (0%) 2.1 s (0%) 830 ms (-9.37% 🔽) 2.9 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 99 ms (+148.72% 🔺) 195 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 27 ms (+8.88% 🔺) 37 ms
thirdweb/react (minimal + tree-shaking) 16.78 KB (0%) 336 ms (0%) 183 ms (+214.54% 🔺) 518 ms

Copy link

codecov bot commented Sep 13, 2024

Codecov Report

Attention: Patch coverage is 69.78610% with 113 lines in your changes missing coverage. Please review.

Project coverage is 47.87%. Comparing base (71575af) to head (90b5495).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ages/thirdweb/src/extensions/pack/createNewPack.ts 65.37% 98 Missing ⚠️
...s/thirdweb/src/extensions/prebuilts/deploy-pack.ts 83.51% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4579      +/-   ##
==========================================
+ Coverage   47.72%   47.87%   +0.14%     
==========================================
  Files        1051     1053       +2     
  Lines       56718    57092     +374     
  Branches     3903     3926      +23     
==========================================
+ Hits        27070    27332     +262     
- Misses      28960    29072     +112     
  Partials      688      688              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 71575af
packages 43.68% <69.78%> (+0.21%) ⬆️

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

Files with missing lines Coverage Δ
...s/thirdweb/src/extensions/prebuilts/deploy-pack.ts 83.51% <83.51%> (ø)
...ages/thirdweb/src/extensions/pack/createNewPack.ts 65.37% <65.37%> (ø)

... and 1 file with indirect coverage changes

Copy link

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

Copy link

graphite-app bot commented Sep 28, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces new functionalities and enhancements for the `Pack` contract in the `thirdweb` project, including event definitions, deployment options, and methods for managing packs and rewards.

### Detailed summary
- Added `initialize` function to `Pack.json`.
- Exported new types and functions in `deploy-pack.ts`.
- Defined new events and functions in `IPackVRFDirect.json`.
- Created tests for deploying `Pack` contracts.
- Updated changelog with Pack extensions.
- Implemented various methods for managing packs, including `openPack`, `addPackContents`, and `claimRewards`.

> The following files were skipped due to too many changes: `packages/thirdweb/src/extensions/pack/createNewPack.test.ts`, `packages/thirdweb/src/extensions/prebuilts/__generated__/Pack/write/initialize.ts`, `packages/thirdweb/src/extensions/pack/__generated__/IPack/write/createPack.ts`, `packages/thirdweb/src/extensions/pack/createNewPack.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