Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pkg/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ var geth = ClientErrors{
NonceTooHigh: regexp.MustCompile(`(: |^)nonce too high$`),
ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)replacement transaction underpriced$`),
TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(?i)(known transaction|already known)`),
TerminallyUnderpriced: regexp.MustCompile(`(: |^)transaction underpriced$`),
// Bor/Polygon may use "transaction gas price below minimum" instead of stock geth "transaction underpriced".
TerminallyUnderpriced: regexp.MustCompile(`(: |^)(transaction underpriced$|transaction gas price below minimum)`),
InsufficientEth: regexp.MustCompile(`(: |^)(insufficient funds for transfer|insufficient funds for gas \* price \+ value|insufficient balance for transfer|transaction would cause overdraft)$`),
TxFeeExceedsCap: regexp.MustCompile(`(: |^)tx fee \([0-9\.]+ [a-zA-Z]+\) exceeds the configured cap \([0-9\.]+ [a-zA-Z]+\)$`),
Fatal: gethFatal,
Expand Down Expand Up @@ -142,7 +143,7 @@ var erigon = ClientErrors{
NonceTooHigh: regexp.MustCompile(`(: |^)nonce too high$`),
ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)replacement transaction underpriced$`),
TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(block already known|already known)`),
TerminallyUnderpriced: regexp.MustCompile(`(: |^)transaction underpriced$`),
TerminallyUnderpriced: regexp.MustCompile(`(: |^)(transaction underpriced$|transaction gas price below minimum)`),
InsufficientEth: regexp.MustCompile(`(: |^)(insufficient funds for transfer|insufficient funds for gas \* price \+ value|insufficient balance for transfer)$`),
TxFeeExceedsCap: regexp.MustCompile(`(: |^)tx fee \([0-9\.]+ [a-zA-Z]+\) exceeds the configured cap \([0-9\.]+ [a-zA-Z]+\)$`),
Fatal: erigonFatal,
Expand Down
2 changes: 2 additions & 0 deletions pkg/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ func Test_Eth_Errors(t *testing.T) {

tests := []errorCase{
{"transaction underpriced", true, "geth"},
{"transaction gas price below minimum: gas tip cap 25000000000 wei, minimum needed 26000000000 wei", true, "geth"},
{"replacement transaction underpriced", false, "geth"},
{"Gas price below configured minimum gas price", true, "Besu"},
{"transaction underpriced", true, "Erigon"},
{"transaction gas price below minimum: gas tip cap 1 gwei, minimum needed 25 gwei", true, "Erigon"},
{"There are too many transactions in the queue. Your transaction was dropped due to limit. Try increasing the fee.", false, "Parity"},
{"Transaction gas price is too low. It does not satisfy your node's minimal gas price (minimal: 100 got: 50). Try increasing the gas price.", true, "Parity"},
{"gas price too low", true, "Arbitrum"},
Expand Down
Loading