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

Event filters by Param not working #316

Open
bitcoinwarrior1 opened this issue Mar 11, 2020 · 3 comments
Open

Event filters by Param not working #316

bitcoinwarrior1 opened this issue Mar 11, 2020 · 3 comments

Comments

@bitcoinwarrior1
Copy link

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?

@skywinder
Copy link
Contributor

This repo is outdated and not supported anymore. Core contributors moved development to the new repo:
https://github.com/matter-labs/web3swift
Feel free continue discussion in the new repository.

@bitcoinwarrior1
Copy link
Author

@skywinder have done so, maybe would be good to archive this repo?

@skywinder
Copy link
Contributor

skywinder commented Mar 13, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants