view method

Future view(
  1. String function,
  2. List typeArguments,
  3. List arguments, {
  4. int? ledgerVersion,
})

View ///

Implementation

Future<dynamic> view(
  String function,
  List<dynamic> typeArguments,
  List<dynamic> arguments,
  {int? ledgerVersion}
) async {
  final data = <String, dynamic>{
    "function": function,
    "type_arguments": typeArguments,
    "arguments": arguments
  };
  final params = ledgerVersion != null ? { "ledger_version": ledgerVersion } : null;
  final path = "$endpoint/view";
  final resp = await http.post(path, data: data, queryParameters: params);
  return resp.data;
}