question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: filtering with tuples or arrays not supported

See original GitHub issue

Hey, I have array of Hashes that I want to log in an event so that I can search for the hashes later on. But ethers.js doesn’t seem to filter the array of Hashes present. Solidity code: event onSubmission(bytes32[] indexed docHash);

NodeJs code: const filter = await contract.filters.onSubmission(["0x69a013f23c52f5415ae41e64561a6948e08df59904925db53f0df74fd64a3833"]);

I get: Error: filtering with tuples or arrays not supported (argument="contract.docHash", value=[], code=INVALID_ARGUMENT, version=abi/5.0.1)

Is it possible to search for an array inside a event?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sssubikcommented, Oct 20, 2020

Hey @ricmoo. Thanks for your hints. I am using your way of emitting onSumbission(bytes32 docHash) by looping through all the docHashes

0reactions
sssubikcommented, Nov 5, 2020

@ricmoo Hey Thanks for the info. Ya it requires no hashing. Hah! very friendly api

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filter array of tuples in swift - Stack Overflow
I have an array of named tuples.
Read more >
Creating an array of tuples (why doesn't filter work on a zip?)
Firstly, it appears that filter doesn't support Zip iterators. That's a bit surprising, maybe? You'll have to collect the Zip object into a...
Read more >
TypeScript: Arrays and Tuples - DEV Community ‍ ‍
When working with array methods like map, filter or reduce, you gain an advantage of type inference and autocomplete. If we map through...
Read more >
Arrays in F# | Microsoft Learn
You can access array elements by using brackets ( [ and ] ). The original dot syntax ( .[index] ) is still supported...
Read more >
Built-in Functions — Python 3.11.1 documentation
If x is not a Python int object, it has to define an __index__() method that ... The optional source parameter can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found