Skip to content
This repository was archived by the owner on Sep 13, 2024. It is now read-only.
This repository was archived by the owner on Sep 13, 2024. It is now read-only.

Event filters by Param not working #316

@JamesANZ

Description

@JamesANZ

Hi All, thanks for providing this library!

I am writing some code which retrives filtered events from a node but I noticed that my filter params are ignored completely.

let filterParam = [([EthereumAddress("0xf8bf2546b61a4b7a277d118290dc9dcbb34d29a6")!] as [EventFilterable]), (nil as [EventFilterable]?)] let eventFilter = EventFilter(fromBlock: .blockNumber(0), toBlock: .latest, parameterFilters: filterParam) let getEventsPromise = getEventLogs( withServer: RPCServer(chainID: 1), contract: AlphaWallet.Address(string: "0xF0AD5cAd05e10572EfcEB849f6Ff0c68f9700455")!, eventName: "NameRegistered", // swiftlint:disable:next line_length abiString: ".....", filter: eventFilter )

With this code I get back:

nodeError "query returned more than 10000 results"

This suggests that it is ignoring the filter and simply grabbing all the results of NameRegistered from ENS.

If I do it with web3.js I get back around 200 results, you can see the code for that here: https://gist.github.com/James-Sangalli/0509258f3d56b66b68bfd6d51a10639a

Could you please explain why the filter params are not working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions