Bitquery is amazing, just started experimenting around two days ago and got one small issue. Using to query some Avalanche data.
I’m currently using the following code to count calls of a smart contract
smartContractAddress: {is: $address}
while filtering one specific method
smartContractMethod: {is: "a47d9d33"}
the whole code looks like this
query ($network: EthereumNetwork!, $address: String!, $limit: Int!, $offset: Int!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
ethereum(network: $network) {
smartContractCalls(
options: {desc: "count", limit: $limit, offset: $offset}
date: {since: $from, till: $till}
smartContractAddress: {is: $address}
smartContractMethod: {is: "a47d9d33"}
) {
address: caller {
address
annotation
}
max_date: maximum(of: date)
count
gasValue(calculate: average)
}
}
}
and additional data:
{
"limit": 10,
"offset": 0,
"network": "avalanche",
"address": "0x1d34b421a5ede3e300d3b8bcf3be5c6f45971e20",
"nativeCurrency": "AVAX",
"from": "2022-02-10",
"till": "2022-03-11T23:59:59",
"dateFormat": "%Y-%m-%d"
}
How can I “filter” even more?
Example transaction (on Avalanche)
0xf17f3fdabd91e2969c52590f7296bf9f2b2eb6f1dc8ba5ff2c8a071ca7c6a77b
It is possible to filter for the method and count that, however, in this case I need to count by filtering the input data.
The input data in this case is:
The 1 at the end of line [3] is important to count. If there are only zeros in [3] it should not count the call.
Is it possible to dive even further and count or write down the quantity of each of those calls - this info is in [2].
Appreciate any help.
Thank you!