simulateTransaction method
Future
simulateTransaction(
- TransactionRequest transaction, {
- bool estimateGasUnitPrice = false,
- bool estimateMaxGasAmount = false,
- bool estimatePrioritizedGasUnitPrice = false,
Implementation
Future<dynamic> simulateTransaction(
TransactionRequest transaction,
{ bool estimateGasUnitPrice = false,
bool estimateMaxGasAmount = false,
bool estimatePrioritizedGasUnitPrice = false}) async {
final params = <String, bool>{
"estimate_gas_unit_price": estimateGasUnitPrice,
"estimate_max_gas_amount": estimateMaxGasAmount,
"estimate_prioritized_gas_unit_price": estimatePrioritizedGasUnitPrice
};
final path = "$endpoint/transactions/simulate";
final resp = await http.post(path, data: transaction.toJson(), queryParameters: params);
return resp.data;
}