wevm / viem

TypeScript Interface for Ethereum
https://viem.sh
Other
2.44k stars 729 forks source link

feat: add `args` as property on `parseEventLogs` #2533

Closed jxom closed 1 month ago

jxom commented 1 month ago

Resolves #2522.

Added args as a property to parseEventLogs to filter event logs by its arguments, which consequently fixes support for filtering contract logs via its events on abi + args.


PR-Codex overview

This PR enhances event log filtering in contract interactions.

Detailed summary

The following files were skipped due to too many changes: site/pages/docs/contract/parseEventLogs.md, src/utils/abi/parseEventLogs.test.ts

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

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
viem ✅ Ready (Inspect) Visit Preview Jul 24, 2024 11:16pm
changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 18f710650f14a34a4c38670beccebece487bb460

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

This PR includes changesets to release 1 package | Name | Type | | ---- | ----- | | viem | 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

github-actions[bot] commented 1 month ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
import * from 'viem' (esm) 59.67 KB (+0.22% 🔺) 1.2 s (+0.22% 🔺) 8 s (-39.03% 🔽) 9.2 s
const viem = require('viem') (cjs) 70.33 KB (+0.48% 🔺) 1.5 s (+0.48% 🔺) 21.2 s (+49.96% 🔺) 22.6 s
import { createClient, http } from 'viem' 6.2 KB (0%) 124 ms (0%) 895 ms (+197.07% 🔺) 1.1 s
import * from 'viem/account-abstraction' 43.71 KB (0%) 875 ms (0%) 11.7 s (+22.2% 🔺) 12.6 s
import { toCoinbaseSmartAccount } from 'viem/account-abstraction' 33.94 KB (-0.18% 🔽) 679 ms (-0.18% 🔽) 10 s (-0.26% 🔽) 10.7 s
import * from 'viem/accounts' 74.22 KB (0%) 1.5 s (0%) 6.8 s (+88.17% 🔺) 8.3 s
import { privateKeyToAccount } from 'viem/accounts' 19.15 KB (0%) 383 ms (0%) 2.1 s (-35.89% 🔽) 2.4 s
import * from 'viem/actions' 45.42 KB (+0.64% 🔺) 909 ms (+0.64% 🔺) 12.2 s (+79.01% 🔺) 13.1 s
import { getBlockNumber } from 'viem/actions' 318 B (0%) 10 ms (0%) 55 ms (+15.9% 🔺) 65 ms
import * from 'viem/chains' 29.92 KB (0%) 599 ms (0%) 5.3 s (+20.85% 🔺) 5.9 s
import { mainnet } from 'viem/chains' 324 B (0%) 10 ms (0%) 93 ms (+162.23% 🔺) 103 ms
import * from 'viem/chains/utils' 1.02 KB (0%) 21 ms (0%) 52 ms (-40.69% 🔽) 72 ms
import * from 'viem/ens' 45.4 KB (0%) 909 ms (0%) 5.9 s (-8.5% 🔽) 6.8 s
import { getEnsAvatar } from 'viem/ens' 22.09 KB (0%) 442 ms (0%) 3.4 s (-28.9% 🔽) 3.9 s
import * from 'viem/siwe' 30.36 KB (0%) 608 ms (0%) 5 s (+3.29% 🔺) 5.7 s
import { verifySiweMessage } from 'viem/siwe' 29.26 KB (0%) 586 ms (0%) 4.4 s (-54.67% 🔽) 5 s
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.67%. Comparing base (603227e) to head (088e539).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2533 +/- ## ======================================= Coverage 99.67% 99.67% ======================================= Files 749 749 Lines 67661 67751 +90 Branches 3208 3234 +26 ======================================= + Hits 67441 67531 +90 Misses 206 206 Partials 14 14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.