estimateFees method

  1. @override
Future<Eip1559EstimationCompat> estimateFees({
  1. required String chainId,
})
override

Implementation

@override
Future<Eip1559EstimationCompat> estimateFees({
  required String chainId,
}) async {
  try {
    final response = await methodChannel.invokeMethod<dynamic>(
      'estimateFees',
      {
        'chainId': chainId,
      },
    );
    return Eip1559EstimationCompat.fromJson({
      'maxPriorityFeePerGas': response['maxPriorityFeePerGas'],
      'maxFeePerGas': response['maxFeePerGas'],
    });
  } on PlatformException catch (e) {
    debugPrint('[$runtimeType] estimateFees $e');
    rethrow;
  }
}