call - Ethereum Classic

Executes a read-only message call against contract state at a chosen block and returns the output data, gas used, and status — the GraphQL equivalent of eth_call. Accessed within a block selection.

Schema

graphqlblock { call(data: CallData!): CallResult }

Arguments

ArgumentTypeDescription
data.toAddressTarget contract address
data.dataBytesABI-encoded call data
data.fromAddressOptional caller address

Query

graphqlquery {
  block {
    call(data: {to: "0x82A618305706B14e7bcf2592D4B9324A366b6dAd", data: "0x06fdde03"}) {
      data
      status
      gasUsed
    }
  }
}

Example

bashexport ETC_GRAPHQL=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

curl --location --request POST "${ETC_GRAPHQL}graphql" \
--header 'Content-Type: application/json' \
--data-raw '{"query": "query { block { call(data: {to: \"0x82A618305706B14e7bcf2592D4B9324A366b6dAd\", data: \"0x06fdde03\"}) { data status gasUsed } } }"}'

Response

json{
    "data": {
        "block": {
            "call": {
                "data": "0x000000...",
                "status": 1,
                "gasUsed": 24000
            }
        }
    }
}

Response Fields

FieldTypeDescription
dataBytesABI-encoded return value
statusLong1 on success, 0 on revert
gasUsedLongGas consumed by the call

Use Cases

  • Contract Reads: Call a view function without a transaction
  • Token Balances: Read balanceOf and other getters
  • Dry Runs: Check a call would succeed before sending

Error Handling

ErrorMessageDescription
errors[]execution revertedThe call reverted; status is 0
403 / RBAC: access deniedAccess deniedThe GetBlock access token is missing or incorrect