Skip to content

Commit

Permalink
add error for zksync (#12244)
Browse files Browse the repository at this point in the history
* add error for zksync

* Update core/chains/evm/client/errors.go

Co-authored-by: Dimitris Grigoriou <dimitris.grigoriou@smartcontract.com>

---------

Co-authored-by: Dimitris Grigoriou <dimitris.grigoriou@smartcontract.com>
  • Loading branch information
poopoothegorilla and dimriou authored Feb 29, 2024
1 parent ca1c519 commit ef5a4d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion core/chains/evm/client/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ var harmony = ClientErrors{
var zkSync = ClientErrors{
NonceTooLow: regexp.MustCompile(`(?:: |^)nonce too low\..+actual: \d*$`),
NonceTooHigh: regexp.MustCompile(`(?:: |^)nonce too high\..+actual: \d*$`),
TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)max fee per gas less than block base fee$`),
TerminallyUnderpriced: regexp.MustCompile(`(?:: |^)(max fee per gas less than block base fee|virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: The operator included transaction with an unacceptable gas price)$`),
InsufficientEth: regexp.MustCompile(`(?:: |^)(?:insufficient balance for transfer$|insufficient funds for gas + value)`),
TxFeeExceedsCap: regexp.MustCompile(`(?:: |^)max priority fee per gas higher than max fee per gas$`),
// intrinsic gas too low - gas limit less than 14700
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 @@ -155,6 +155,7 @@ func Test_Eth_Errors(t *testing.T) {
{"transaction underpriced", true, "Klaytn"},
{"intrinsic gas too low", true, "Klaytn"},
{"max fee per gas less than block base fee", true, "zkSync"},
{"virtual machine entered unexpected state. please contact developers and provide transaction details that caused this error. Error description: The operator included transaction with an unacceptable gas price", true, "zkSync"},
}

for _, test := range tests {
Expand Down

0 comments on commit ef5a4d0

Please sign in to comment.