Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Jun 10, 2024

Fixes CNCT-1342


PR-Codex overview

This PR enhances the watchContractEvents function in thirdweb by adding automatic retries on event watching and introduces a new retry utility function for handling promise retries.

Detailed summary

  • Added automatic retries on event watching in watchContractEvents
  • Introduced retry utility function for promise retries
  • Added tests for the retry function
  • Updated isEIP155Enforced function with spy and test cases

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

@vercel
Copy link

vercel bot commented Jun 10, 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 Jun 11, 2024 0:20am

@changeset-bot
Copy link

changeset-bot bot commented Jun 10, 2024

🦋 Changeset detected

Latest commit: cad03df

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

This PR includes changesets to release 8 packages
Name Type
thirdweb Patch
@thirdweb-dev/sdk Patch
@thirdweb-dev/cli Patch
@thirdweb-dev/react-core Patch
@thirdweb-dev/react Patch
@thirdweb-dev/unity-js-bridge Patch
@thirdweb-dev/wallets Patch
@thirdweb-dev/auth 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 Author

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

Join @gregfromstl and the rest of your teammates on Graphite Graphite

@gregfromstl gregfromstl marked this pull request as ready for review June 10, 2024 19:45
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch from 50e8712 to 00dd040 Compare June 10, 2024 19:46
@codspeed-hq
Copy link

codspeed-hq bot commented Jun 10, 2024

CodSpeed Performance Report

Merging #3256 will not alter performance

Comparing 06-10-adds_retry_on_watchcontractevents (cad03df) with main (75fde5c)

Summary

✅ 9 untouched benchmarks

@linear
Copy link

linear bot commented Jun 10, 2024

@github-actions
Copy link
Contributor

github-actions bot commented Jun 10, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 40.36 KB (+0.18% 🔺) 808 ms (+0.18% 🔺) 3.1 s (-4.45% 🔽) 3.9 s
thirdweb (cjs) 89.96 KB (+0.03% 🔺) 1.8 s (+0.03% 🔺) 5.6 s (+34.51% 🔺) 7.4 s
thirdweb (minimal + tree-shaking) 4.75 KB (0%) 95 ms (0%) 131 ms (+23.46% 🔺) 226 ms
thirdweb/chains (tree-shaking) 423 B (0%) 10 ms (0%) 61 ms (-8.17% 🔽) 71 ms
thirdweb/react (minimal + tree-shaking) 15.75 KB (0%) 315 ms (0%) 535 ms (-1.55% 🔽) 850 ms

@codecov
Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 65.21739% with 16 lines in your changes missing coverage. Please review.

Project coverage is 63.32%. Comparing base (75fde5c) to head (8ef7761).

Current head 8ef7761 differs from pull request most recent head cad03df

Please upload reports for the commit cad03df to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3256   +/-   ##
=======================================
  Coverage   63.32%   63.32%           
=======================================
  Files         833      834    +1     
  Lines       63394    63433   +39     
  Branches     3425     3432    +7     
=======================================
+ Hits        40142    40172   +30     
- Misses      22577    22586    +9     
  Partials      675      675           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.60% <ø> (ø) Carriedforward from 75fde5c
packages 62.85% <65.21%> (+0.01%) ⬆️

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

Files Coverage Δ
...s/thirdweb/src/utils/any-evm/is-eip155-enforced.ts 94.68% <100.00%> (+0.11%) ⬆️
packages/thirdweb/src/utils/retry.ts 93.10% <93.10%> (ø)
...ackages/thirdweb/src/event/actions/watch-events.ts 60.21% <6.66%> (-4.50%) ⬇️

@gregfromstl gregfromstl enabled auto-merge June 10, 2024 23:22
@gregfromstl gregfromstl added this pull request to the merge queue Jun 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 10, 2024
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch 2 times, most recently from 3a393e4 to 859e100 Compare June 10, 2024 23:30
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch from 859e100 to f64710d Compare June 10, 2024 23:36
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch from f64710d to a5a13d2 Compare June 10, 2024 23:42
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch from a5a13d2 to 8ef7761 Compare June 10, 2024 23:53
@gregfromstl gregfromstl force-pushed the 06-10-adds_retry_on_watchcontractevents branch from 8ef7761 to cad03df Compare June 11, 2024 00:18
@gregfromstl gregfromstl added this pull request to the merge queue Jun 11, 2024
Merged via the queue into main with commit 923a5ec Jun 11, 2024
@gregfromstl gregfromstl deleted the 06-10-adds_retry_on_watchcontractevents branch June 11, 2024 00:27
@jnsdls jnsdls mentioned this pull request Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants