Skip to content

Commit

Permalink
Allow arrays of address for indexed filter topics (ethers-io#4259).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and Woodpile37 committed Jan 14, 2024
1 parent ac2d698 commit 8b46181
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src.ts/contract/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ class PreparedTopicFilter implements DeferredTopicFilter {

return param.walkAsync(args[index], (type, value) => {
if (type === "address") {
if (Array.isArray(value)) {
return Promise.all(value.map((v) => resolveAddress(v, resolver)));
}
return resolveAddress(value, resolver);
}
return value;
Expand Down

0 comments on commit 8b46181

Please sign in to comment.