Replies: 1 comment
-
It seems you're using EtherscanProvider, it does not support topics more than one (code). // this filter will not work with etherscan provider
var filter = tokenContract.filters.Transfer(address); // makes two topics: topic0 is Transfer and topic1 is address
// this filter can work
var filter = tokenContract.filters.Transfer(); // makes single topic: topic0 is Transfer |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I'm trying to list contract Transfer operations from a given wallet address. The objective is to (eventually) determine tokens that were staked in some vault address, so the first step would be to identify Transfer() calls on the contract from the wallet.
I've been trying multiple examples I found here or on the documentations site but I always end up with an "unsupported token count" error.
Here's what I'm doing. Note: I'm using the Bscscan Provider, which AFAIK, only overrides the API url.
Running this on node's interpreter
Returns:
This happens because
tokenContract.filters.Transfer(address);
returns an object where len(topics) > 1 which fails the check atEtherscanProvider.perform()
.How can I go around this? Is there another way to list historic events?
Thanks!
Used dependencies:
Beta Was this translation helpful? Give feedback.
All reactions