set reverted error code to 3

This commit is contained in:
Nikita Meshcheriakov 2025-10-28 20:58:28 +03:00
parent 739f6f46a2
commit 27bd9e71f5

View file

@ -42,7 +42,7 @@ type txSyncTimeoutError struct {
// ErrorCode returns the JSON error code for a revert. // ErrorCode returns the JSON error code for a revert.
// See: https://ethereum.org/en/developers/docs/apis/json-rpc/#error-codes // See: https://ethereum.org/en/developers/docs/apis/json-rpc/#error-codes
func (e *revertError) ErrorCode() int { func (e *revertError) ErrorCode() int {
return 3 return errCodeReverted
} }
// ErrorData returns the hex encoded revert reason. // ErrorData returns the hex encoded revert reason.
@ -112,7 +112,7 @@ const (
errCodeClientLimitExceeded = -38026 errCodeClientLimitExceeded = -38026
errCodeInternalError = -32603 errCodeInternalError = -32603
errCodeInvalidParams = -32602 errCodeInvalidParams = -32602
errCodeReverted = -32000 errCodeReverted = 3
errCodeVMError = -32015 errCodeVMError = -32015
errCodeTxSyncTimeout = 4 errCodeTxSyncTimeout = 4
) )