devInspectTransactionBlock method

Future<DevInspectResults> devInspectTransactionBlock(
  1. String sender,
  2. dynamic transaction, {
  3. BigInt? gasPrice,
  4. String? epoch,
})

Implementation

Future<DevInspectResults> devInspectTransactionBlock(
  String sender,
  dynamic transaction, {
  BigInt? gasPrice,
  String? epoch,
}) async {
  late Uint8List txBytes;
  if (transaction is Transaction) {
    transaction.setSenderIfNotSet(sender);
    txBytes = await transaction.build(
      BuildOptions(client: this, onlyTransactionKind: true),
    );
  } else if (transaction is Uint8List) {
    txBytes = transaction;
  } else {
    throw ArgumentError(
      "transaction must be Transaction or Uint8List",
      "transaction",
    );
  }
  final result = await devInspectTransaction(
    sender,
    txBytes,
    gasPrice: gasPrice,
    epoch: epoch,
  );
  return result;
}