Skip to content

Commit

Permalink
Add Mantle NonceTooLow Error (#14859)
Browse files Browse the repository at this point in the history
* handle mantle "nonce too low" error

* add changeset
  • Loading branch information
ma33r authored and matYang committed Oct 21, 2024
1 parent 0a2e295 commit 198b352
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-worms-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

Added a custom client error message for Mantle to capture NonceTooLow error. #added
1 change: 1 addition & 0 deletions core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ var aStar = ClientErrors{
var mantle = ClientErrors{
InsufficientEth: regexp.MustCompile(`(: |^)'*insufficient funds for gas \* price \+ value`),
Fatal: regexp.MustCompile(`(: |^)'*invalid sender`),
NonceTooLow: regexp.MustCompile(`(: |^)'*nonce too low`),
}

var gnosis = ClientErrors{
Expand Down
2 changes: 2 additions & 0 deletions core/chains/evm/client/errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func Test_Eth_Errors(t *testing.T) {
{"call failed: OldNonce, Current nonce: 22, nonce of rejected tx: 17", true, "Nethermind"},
{"nonce too low. allowed nonce range: 427 - 447, actual: 426", true, "zkSync"},
{"client error nonce too low", true, "tomlConfig"},
{"[Request ID: 2e952947-ffad-408b-aed9-35f3ed152001] Nonce too low. Provided nonce: 15, current nonce: 15", true, "hedera"},
{"failed to forward tx to sequencer, please try again. Error message: 'nonce too low'", true, "Mantle"},
}

for _, test := range tests {
Expand Down

0 comments on commit 198b352

Please sign in to comment.