ethql
ethql copied to clipboard
How to query ERC20 transfers emitted from a specific contract?
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:
-
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.
-
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.