Skip to main content

Fantom Smart Contract Calls API

Endpoint

Fantom GraphQL queries are served at https://graphql.bitquery.io. Pass network: fantom to the ethereum field.

smartContractCalls type allows you to retrieve smart contract calls made to any smart contract on Fantom Blockchain.

Here's an example query that retrieves 10 latest smart contract calls made to the WFTM (Wrapped Fantom) smart contract on Fantom blockchain.

{
ethereum(network: fantom) {
smartContractCalls(
smartContractAddress: {is: "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83"}
options: {limit: 10, desc: "block.timestamp.iso8601"}
date: {after: "2026-11-20T00:00:00Z"}
) {
block {
timestamp {
iso8601
}
}
amount
arguments {
argument
argumentType
index
value
}
callDepth
gasValue
smartContract {
address {
address
annotation
}
}
smartContractMethod {
name
signature
signatureHash
}
}
}
}

Filtering Smart Contract Calls

Smart Contract Calls can be filtered using following arguments:

  • any:
  • callDepth: Filter by call depth of smart contract calls. Available comparison operators are in, is, not, notIn.
  • caller: Filter by caller of that call. Avaiable comparison operators are in, 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 be 2023-07-17T00:00:00Z. Available comparison operators are after, before, between, in, is, not, notIn, since, till.
  • external:
  • height: Filter by height of block where smart contract call was executed. Available comparison operators are between, 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, `offset
  • smartContractAddress: Filter by address of the smart contract. Available comaprision operators are in, is, not, notIn.
  • smartContractMethod: Filter by method of the smart contract was called. Available comaprision operators are in, is, not, notIn.
  • smartContractType: Filter by type of the smart contract on which call happened. Avaiable comparison operators are in, 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 be 2023-07-17T00:00:00Z. Available comparison operator are after, before, between, in, is, not, notIn, since, till.
  • txFrom: Filter by the address responsible for executing smart contract calls. Available comparison operators are in, is, not, notIn.
  • txHash: Filter by transaction hash of the transaction in which smart contract call was executed. Available comparison operators are is, in, not, notIn.
  • amount: returns amount transferred in the smart contract call
  • any :
  • arguments: returns details of the arguments passed while executing smart contract call
  • block: returns details of block in which smart contract call was executed
  • callDepth: returns details internal calls that were made in that particular transaction
  • caller: returns details of address that executed smart contract
  • count: returns aggregate count of smart contract calls
  • countBigInt: returns aggregate count of smart contract calls in BigInt format
  • date: returns date on smart contract call was executed
  • expression: performs arithmetic operation and returns value of the operation
  • gasValue: returns gas consumed by a particular smart contract call
  • maximum: returns maximum of selected measurable fields) of smartContractCalls
  • minimum: returns minimum of selected measurable fields) of smartContractCalls
  • smartContract: returns details of smart contract
  • smartContractMethod: returns details of method to which the call was made
  • success: returns if calls is successful or not
  • transaction: returns details of the transaction in which smart contract call was executed
Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.