Skip to content

fix(thirdweb): add optional 'from' in readContract method #3735

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

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Jul 18, 2024

Fixes #3683


PR-Codex overview

The focus of this PR is to enhance the blockchain API functionalities by adding an optional 'from' parameter in readContract() and adjusting block wait times.

Detailed summary

  • Added optional 'from' parameter in readContract()
  • Adjusted block wait times to 10 blocks in multiple files
  • Updated default max blocks wait time to 100
  • Modified useReadContract function parameters for improved functionality

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

Copy link

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

Copy link

changeset-bot bot commented Jul 18, 2024

🦋 Changeset detected

Latest commit: 6cc3038

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

Copy link
Contributor

graphite-app bot commented Jul 18, 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.

@github-actions github-actions bot added the TS SDK Involves changes to the v5 TypeScript SDK. label Jul 18, 2024
Copy link
Member Author

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

@joaquim-verges joaquim-verges marked this pull request as ready for review July 18, 2024 00:01
Copy link

codspeed-hq bot commented Jul 18, 2024

CodSpeed Performance Report

Merging #3735 will not alter performance

Comparing fix-thirdweb-update-readcontract-options (6cc3038) with main (db2cadf)

Summary

✅ 9 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jul 18, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43.16 KB (+0.1% 🔺) 864 ms (+0.1% 🔺) 940 ms (+14.45% 🔺) 1.9 s
thirdweb (cjs) 91.17 KB (-0.19% 🔽) 1.9 s (-0.19% 🔽) 1.5 s (-14.23% 🔽) 3.3 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 240 ms (+309.66% 🔺) 337 ms
thirdweb/chains (tree-shaking) 433 B (0%) 10 ms (0%) 121 ms (+302.31% 🔺) 131 ms
thirdweb/react (minimal + tree-shaking) 13.52 KB (+0.02% 🔺) 271 ms (+0.02% 🔺) 180 ms (+157.54% 🔺) 450 ms

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.

Broken test to fix otherwise looks good. Seems like the test is broken due do not relying on the default block wait time const only.

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.51%. Comparing base (db2cadf) to head (6cc3038).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3735   +/-   ##
=======================================
  Coverage   61.51%   61.51%           
=======================================
  Files         926      926           
  Lines       73136    73138    +2     
  Branches     3716     3717    +1     
=======================================
+ Hits        44987    44989    +2     
  Misses      27465    27465           
  Partials      684      684           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.66% <ø> (ø) Carriedforward from db2cadf
packages 60.78% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
...web/src/transaction/actions/wait-for-tx-receipt.ts 93.06% <100.00%> (ø)
packages/thirdweb/src/transaction/read-contract.ts 88.46% <100.00%> (+0.12%) ⬆️
...es/thirdweb/src/wallets/eip5792/wait-for-bundle.ts 95.91% <100.00%> (ø)

Copy link
Contributor

graphite-app bot commented Jul 18, 2024

Merge activity

Fixes #3683

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to add an optional 'from' parameter in the `readContract()` function and update default max block wait times to 100 in various files.

### Detailed summary
- Added optional 'from' parameter in `readContract()`
- Updated default max block wait times to 10 in specific files
- Increased default max block wait times to 100 in other files

> ✨ 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
Playground Changes involving the Playground codebase. TS SDK Involves changes to the v5 TypeScript SDK.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Override "from" on useReadContract
2 participants