fetchEstimatedTime method
- int gasPrice
Implementation
Future<int?> fetchEstimatedTime(int gasPrice) async {
final endpoint = "$base&module=gastracker&action=gasestimate&gasprice=$gasPrice";
final result = await fetchEtherscanWithRatelimitRetries(endpoint);
if (result is! String) {
throw Exception("Failed to fetch gas price");
}
return int.tryParse(result);
}