getFeeStats method

Future<GetFeeStatsResponse> getFeeStats()
inherited

Statistics for charged inclusion fees. The inclusion fee statistics are calculated from the inclusion fees that were paid for the transactions to be included onto the ledger. For Soroban transactions and Stellar transactions, they each have their own inclusion fees and own surge pricing. Inclusion fees are used to prevent spam and prioritize transactions during network traffic surge.

Implementation

Future<GetFeeStatsResponse> getFeeStats() async {
  JsonRpcMethod getFeeStats = JsonRpcMethod("getFeeStats");
  dio.Response response = await _dio.post(_serverUrl,
      data: json.encode(getFeeStats),
      options: dio.Options(headers: _headers));
  if (enableLogging) {
    print("getFeeStats response: $response");
  }
  return GetFeeStatsResponse.fromJson(response.data);
}