diff --git a/.changeset/unlucky-crews-boil.md b/.changeset/unlucky-crews-boil.md new file mode 100644 index 0000000000..73293a6223 --- /dev/null +++ b/.changeset/unlucky-crews-boil.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Fixed zeroish log filter argument parsing. diff --git a/src/utils/abi/parseEventLogs.ts b/src/utils/abi/parseEventLogs.ts index 95721fe917..2937c4df4f 100644 --- a/src/utils/abi/parseEventLogs.ts +++ b/src/utils/abi/parseEventLogs.ts @@ -193,7 +193,7 @@ function includesArgs(parameters: { if (Array.isArray(args) && Array.isArray(matchArgs)) { return matchArgs.every((value, index) => { - if (!value) return true + if (value === null) return true const input = inputs[index] if (!input) return false const value_ = Array.isArray(value) ? value : [value] @@ -208,7 +208,7 @@ function includesArgs(parameters: { !Array.isArray(matchArgs) ) return Object.entries(matchArgs).every(([key, value]) => { - if (!value) return true + if (value === null) return true const input = inputs.find((input) => input.name === key) if (!input) return false const value_ = Array.isArray(value) ? value : [value]