ethql icon indicating copy to clipboard operation
ethql copied to clipboard

How to query ERC20 transfers emitted from a specific contract?

Open zulhfreelancer opened this issue 4 years ago • 0 comments

Hi,

I'm new to this. I have this query:

{
  blocksRange(numberRange:[8649100,8649107]) {
    transactions(filter: {withInput: true}) {
      decoded {
        ... on ERC20Transfer {
          tokenContract {
            symbol
          }
        }
      }
    }
  }
}

I have two questions:

  1. Does it possible to query all ERC20 transfers emitted from a specific contract i.e. USDC contract? The above query is somehow returns all transfers between two blocks and I don't want that. I'm just interested in USDC transfers.

  2. Is there a way to put big range for the blocksRange? From my testing, looks like it can only support up to 10 blocks. Can I query all ERC20 transfers emitted from a specific contract from the beginning (since after the contract get deployed) until the latest block?

Thanks.

zulhfreelancer avatar Sep 30 '19 09:09 zulhfreelancer