devInspectTransactionBlock method

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

Simulates transaction from sender without submitting it, returning the execution effects and any return values. Useful for gas estimation and read-only Move calls.

Implementation

Future<DevInspectResults> devInspectTransactionBlock(
    String sender, Transaction transaction,
    {BigInt? gasPrice, String? epoch}) async {
  transaction.setSenderIfNotSet(sender);
  final txBytes = await transaction
      .build(BuildOptions(client: this, onlyTransactionKind: true));
  final result = await devInspectTransaction(sender, txBytes,
      gasPrice: gasPrice, epoch: epoch);
  return result;
}