Avalanche Smart Contract Calls API allows you to retrieve smart contract calls made to any smart contract on Avalanche network.Below are the fields in the schema:
query ($network: EthereumNetwork!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
ethereum(network: $network) {
smartContractCalls(
options: {desc: "block.height", limit: 10, offset: 0}
time: {since: $from, till: $till}
external: true
) {
block {
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
height
}
address: caller {
address
annotation
}
smartContract {
address {
address
annotation
}
}
smartContractMethod {
name
signatureHash
}
transaction {
hash
}
}
}
}
{
"network": "avalanche",
"from": "2023-08-25T09:43:35.000Z",
"till": "2023-08-25T10:13:35.000Z",
"dateFormat": "%Y-%m-%d"
}
Filtering Smart Contract Calls
Smart Contract Calls can be filtered using following arguments:
any:callDepth: Filter by call depth of smart contract calls. Available comparision operators arein,is,not,notIn.caller: Filter by caller of that call. Avaiable comparision operators arein,is,not,notIn.date: Filter by date on which smart contract calls was executed. Date should be in ISO8601-encoded datetime string. Ex, June 17th, 2023 will be2023-07-17T00:00:00Z. Available comparision operators areafter,before,between,in,is,not,notIn,since,tiil.external:height: Filter by height of block where smart contract call was executed. Available comparision operators arebetween,gt,gteq,in,is,lt,lteq,not,notIn.options: Filter returned data by ordering, limiting and constrainting smart contract call data. Available fields:asc,ascByInteger,desc,descByInteger,limit,limitBy, `offsetsmartContractAddress: Filter by address of the smart contract. Available comaprision operators arein,is,not,notIn.smartContractMethod: Filter by method of the smart contract was called. Available comaprision operators arein,is,not,notIn.smartContractType: Filter by type of the smart contract on which call happened. Avaiable comparision operators arein,is,not,notIn.success:time: Filter by time when smart contract call was executed. Time should be in ISO8601-encoded datetime string. Ex, June 17th, 2023 will be2023-07-17T00:00:00Z. Available comparision operator areafter,before,between,in,is,not,notIn,since,tiil.txFrom: Filter by the address responsible for executing smart contract calls. Available comparision operators arein,is,not,notIn.txHash: Filter by transaction hash of the transaction in which smart contract call was executed. Available comparision operators areis,in,not,notIn.
amount: returns amount transferred in the smart contract callany:arguments: returns details of the arguments passed while executing smart contract callblock: returns details of block in which smart contract call was executedcallDepth: returns details internal calls that were made in that particular transactioncaller: returns details of address that executed smart contractcount: returns aggregate count of smart contract callscountBigInt: returns aggregate count of smart contract calls inBigIntformatdate: returns date on smart contract call was executedexpression: performs arithematic operation and returns value of the operationgasValue: returns gas consumed by a particular smart contract callmaximum: returns maximum of selected measurable fields ofsmartContractCallsminimum: returns minimum of selected measurable fields ofsmartContractCallssmartContract: returns details of smart contractsmartContractMethod: returns details of method to which the call was madesuccess: returns if calls is successful or nottransaction: returns details of the transaction in which smart contract call was executed