simulateTransactionTree method

  1. @override
Future<List<TxTreeSimulationErrorItem>> simulateTransactionTree({
  1. required SignedMessage signedMessage,
  2. required Int32List ignoredComputePhaseCodes,
  3. required Int32List ignoredActionPhaseCodes,
})
override

Implementation

@override
Future<List<TxTreeSimulationErrorItem>> simulateTransactionTree({
  required SignedMessage signedMessage,
  required Int32List ignoredComputePhaseCodes,
  required Int32List ignoredActionPhaseCodes,
}) async {
  if (_disposed) throw TransportCallAfterDisposeError();

  final encoded = await transport.simulateTransactionTree(
      signedMessage: jsonEncode(signedMessage),
      ignoredComputePhaseCodes: ignoredComputePhaseCodes,
      ignoredActionPhaseCodes: ignoredActionPhaseCodes);
  final decoded = jsonDecode(encoded) as List<dynamic>;

  return decoded
      .map((e) =>
          TxTreeSimulationErrorItem.fromJson(e as Map<String, dynamic>))
      .toList();
}