Back to All

eth_getLogs does not take array of addresses

I am trying to get events of multiple contracts at the same time.
The method spec says that I can use a address string or array of strings.
https://docs.alchemy.com/reference/eth-getlogs-polygon

When I try to do it, I get error from @ethersproject saying:
Error: invalid address or ENS name (argument="name", value=["0x6B1bb72cd9F24E98FcFb008C7a8514792A774a0e","0xceA7d3eD9B3EE82F4b081Ad3ed3A5A80E05f318c"], code=INVALID_ARGUMENT, version=providers/5.7.2)

If I try to do a request separately it works normaly, so the addresses are ok (I changed them in the example.)