getTransactionCost method
Implementation
@override
Future<TransactionCost> getTransactionCost(
{required String networkUrl,
required String transactionRequestHexOrJson}) async {
final provider = fuels.Provider(bridge: _bridge, nodeUrl: networkUrl);
final bytes = hex.decode(removeHexPrefix(transactionRequestHexOrJson));
final txCost = await provider.estimateTransactionCost(
encodedTx: Uint8List.fromList(bytes));
return TransactionCost(
gasPrice: txCost.gasPrice,
gasUsed: txCost.gasUsed,
minFee: txCost.totalFee,
maxFee: txCost.totalFee,
);
}