scReadOnlyCall method

  1. @override
Future<Uint8List> scReadOnlyCall({
  1. required double maximumGas,
  2. required String smartContracAddress,
  3. required String functionName,
  4. required Uint8List functionParameters,
})
override

scReadOnlyCall reads only smart contracts

Implementation

@override
Future<Uint8List> scReadOnlyCall({
  required double maximumGas,
  required String smartContracAddress,
  required String functionName,
  required Uint8List functionParameters,
}) async {
  try {
    final fee = minimumFee;
    final response = await _grpc.executeReadOnlyCall(
        fee, maximumGas, smartContracAddress, functionName, functionParameters,
        callerAddress: account.address());
    return Uint8List.fromList(response.callResult);
  } catch (error) {
    throw Exception(error);
  }
}