Update errors.go

This commit is contained in:
FT 2025-07-14 16:22:34 +02:00 committed by GitHub
parent 9388733e05
commit 65414770ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,7 +34,7 @@ type revertError struct {
}
// ErrorCode returns the JSON error code for a revert.
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
// See: https://ethereum.org/en/developers/docs/apis/json-rpc/#error-codes
func (e *revertError) ErrorCode() int {
return 3
}
@ -71,7 +71,7 @@ func (e *TxIndexingError) Error() string {
}
// ErrorCode returns the JSON error code for a revert.
// See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
// See: https://ethereum.org/en/developers/docs/apis/json-rpc/#error-codes
func (e *TxIndexingError) ErrorCode() int {
return -32000 // to be decided
}