Skip to content

Commit

Permalink
Add Geth InsufficientEth client error (#13312)
Browse files Browse the repository at this point in the history
* Added client error under Geth InsufficientEth

* Added changeset
  • Loading branch information
amit-momin authored May 28, 2024
1 parent 2f6778d commit c3829ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-bobcats-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": minor
---

#internal Added new Geth InsufficientEth client error for internal TXM classification
2 changes: 1 addition & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ var geth = ClientErrors{
ReplacementTransactionUnderpriced: regexp.MustCompile(`(: |^)replacement transaction underpriced$`),
TransactionAlreadyInMempool: regexp.MustCompile(`(: |^)(?i)(known transaction|already known)`),
TerminallyUnderpriced: regexp.MustCompile(`(: |^)transaction underpriced$`),
InsufficientEth: regexp.MustCompile(`(: |^)(insufficient funds for transfer|insufficient funds for gas \* price \+ value|insufficient balance for transfer)$`),
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
1 change: 1 addition & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func Test_Eth_Errors(t *testing.T) {
{"insufficient balance for transfer", true, "zkSync"},
{"insufficient funds for gas + value. balance: 42719769622667482000, fee: 48098250000000, value: 42719769622667482000", true, "celo"},
{"client error insufficient eth", true, "tomlConfig"},
{"transaction would cause overdraft", true, "Geth"},
}
for _, test := range tests {
err = evmclient.NewSendErrorS(test.message)
Expand Down

0 comments on commit c3829ca

Please sign in to comment.