Skip to content

Commit

Permalink
Add Mantle NonceTooLow Error (#14859) (#1505)
Browse files Browse the repository at this point in the history
https://github.com/smartcontractkit/chainlink/pull/14859/files#diff-e9a4f21557894a9a2c77ca090bea14ed69bdfea02500c0cfd04628a1941f6e6c

* handle mantle "nonce too low" error

* add changeset

## Motivation


## Solution

Co-authored-by: Matthew Romage <[email protected]>
  • Loading branch information
matYang and ma33r committed Oct 21, 2024
1 parent a917e9a commit 909ecdf
Show file tree
Hide file tree
Showing 3 changed files with 7 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 @@ -257,6 +257,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
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 @@ -44,6 +44,7 @@ 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"},
{"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 909ecdf

Please sign in to comment.