feat(gas_oracle): implement median-based priority fee suggestion for Optimism (#16794)

This commit is contained in:
Mablr
2025-06-14 17:29:01 +02:00
committed by GitHub
parent 82e9988049
commit bb4bf298ec
2 changed files with 74 additions and 3 deletions

View File

@@ -244,9 +244,8 @@ where
}
async fn suggested_priority_fee(&self) -> Result<U256, Self::Error> {
let base_tip = self.inner.eth_api.gas_oracle().suggest_tip_cap().await?;
let min_tip = U256::from(self.inner.min_suggested_priority_fee);
Ok(base_tip.max(min_tip))
self.inner.eth_api.gas_oracle().op_suggest_tip_cap(min_tip).await.map_err(Into::into)
}
}