Skip to content

Commit

Permalink
fix(builder): fix err msg template for replacement underpriced
Browse files Browse the repository at this point in the history
  • Loading branch information
dancoombs committed Sep 18, 2024
1 parent a393636 commit 2a0e8be
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/builder/src/sender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,15 @@ impl From<ProviderError> for TxSenderError {
match &value {
ProviderError::JsonRpcClientError(e) => {
if let Some(e) = e.as_error_response() {
if e.message.contains("replacement transaction underpriced") {
// geth
if e.message.contains("replacement transaction underpriced")
// erigon
|| e.message.contains("could not replace existing tx")
// reth
|| e.message.contains("insufficient gas price to replace existing transaction")
{
return TxSenderError::ReplacementUnderpriced;
// geth, erigon, reth
} else if e.message.contains("nonce too low") {
return TxSenderError::NonceTooLow;
// Arbitrum conditional sender error message
Expand Down

0 comments on commit 2a0e8be

Please sign in to comment.