save before flight

This commit is contained in:
pgherveou
2025-10-13 13:05:07 +02:00
parent 0a68800856
commit 1659164310
3 changed files with 101 additions and 18 deletions
@@ -51,12 +51,9 @@ where
provider: &P,
tx: &<N as Network>::TransactionRequest,
) -> TransportResult<Self::Fillable> {
// Try to fetch GasFillers fillable (gas_price, base_fee, estimate_gas, …)
// If it errors (i.e. tx would revert under eth_estimateGas), swallow it.
match self.inner.prepare(provider, tx).await {
Ok(fill) => Ok(Some(fill)),
Err(_) => Ok(None),
}
// Try to fetch GasFiller's "fillable" (gas_price, base_fee, estimate_gas, …)
// Propagate errors so caller can handle them appropriately
self.inner.prepare(provider, tx).await.map(Some)
}
async fn fill(