Skip to content

Conversation

@kien-ngo
Copy link
Contributor

@kien-ngo kien-ngo commented Dec 5, 2024

CNCT-2555


PR-Codex overview

This PR adds an erc20Value property to the buyFromListing transaction, enabling proper handling of ERC20 currency in marketplace listings. It also includes tests to ensure the functionality works as expected with ERC20 tokens.

Detailed summary

  • Added erc20Value to buyFromListing transaction.
  • Implemented logic to calculate erc20Value based on listing price and quantity.
  • Introduced tests for buyFromListing with ERC20 currency.
  • Included deployment of an ERC20 contract in tests.
  • Verified approval transaction for the buyFromListing.

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

@vercel
Copy link

vercel bot commented Dec 5, 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 Dec 6, 2024 5:22am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 5:22am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 5:22am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 6, 2024 5:22am

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2024

🦋 Changeset detected

Latest commit: 0aa2416

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 5, 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.

@kien-ngo kien-ngo marked this pull request as ready for review December 5, 2024 18:05
@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 5, 2024
Copy link
Contributor Author

kien-ngo commented Dec 5, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 45.72 KB (0%) 915 ms (0%) 3.2 s (+23.07% 🔺) 4.1 s
thirdweb (cjs) 106.26 KB (0%) 2.2 s (0%) 7.7 s (+26.93% 🔺) 9.8 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 334 ms (+106.45% 🔺) 446 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 50 ms (+27.64% 🔺) 60 ms
thirdweb/react (minimal + tree-shaking) 18.74 KB (0%) 375 ms (0%) 622 ms (-30.21% 🔽) 997 ms

@codecov
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 47.86%. Comparing base (fbb2ec9) to head (0aa2416).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5630      +/-   ##
==========================================
+ Coverage   47.82%   47.86%   +0.03%     
==========================================
  Files        1088     1088              
  Lines       56661    56667       +6     
  Branches     4305     4314       +9     
==========================================
+ Hits        27099    27122      +23     
+ Misses      28864    28847      -17     
  Partials      698      698              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from fbb2ec9
packages 43.62% <100.00%> (+0.04%) ⬆️

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

Files with missing lines Coverage Δ
...arketplace/direct-listings/write/buyFromListing.ts 84.78% <100.00%> (+7.28%) ⬆️

... and 4 files with indirect coverage changes

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 6, 2024

Merge activity

CNCT-2555

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces the `erc20Value` parameter to the `buyFromListing` transaction, enhancing the functionality for transactions involving ERC20 tokens. It also includes tests to ensure proper handling of ERC20 transactions in the marketplace.

### Detailed summary
- Added `erc20Value` to `buyFromListing` to handle ERC20 transactions.
- Implemented a test case for the new `erc20Value` functionality.
- Deployed an ERC20 contract for testing purposes.
- Verified the correct approval transaction is generated for ERC20 purchases.

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

packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants