Documentation ¶
Index ¶
- Variables
- func NewEndpointNotSupportedError(endpoint string) error
- func NewFailedTransactionError(reason string) error
- func NewHeightOutOfRangeError(height uint64) error
- func NewInvalidTransactionError(err error) error
- func NewRecoverableError(err error) error
- func NewTxGasPriceTooLowError(gasPrice *big.Int) error
- type RevertError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEndpointNotSupported = errors.New("endpoint is not supported") ErrRateLimit = errors.New("limit of requests per second reached") ErrIndexOnlyMode = errors.New("transaction submission not allowed in index-only mode") ErrInternal = errors.New("internal error") ErrInvalid = errors.New("invalid") ErrRecoverable = errors.New("recoverable") ErrDisconnected = NewRecoverableError(errors.New("disconnected")) ErrMissingBlock = errors.New("missing block") ErrMissingTransactions = errors.New("missing transactions") ErrFailedTransaction = errors.New("failed transaction") ErrInvalidTransaction = fmt.Errorf("%w: %w", ErrInvalid, ErrFailedTransaction) // ErrStorageNotInitialized indicates storage instance was not correctly initialized and contains empty required values. ErrStorageNotInitialized = errors.New("storage not initialized") // ErrEntityNotFound indicates the resource does not exist. ErrEntityNotFound = errors.New("entity not found") // ErrInvalidBlockRange indicates that the block range provided as start and end height is invalid. ErrInvalidBlockRange = fmt.Errorf("%w %w", ErrInvalid, errors.New("block height range")) // ErrHeightOutOfRange indicates the requested height is out of available range ErrHeightOutOfRange = fmt.Errorf("%w %w", ErrInvalid, errors.New("height not in available range")) )
Functions ¶
func NewEndpointNotSupportedError ¶ added in v0.29.3
func NewFailedTransactionError ¶ added in v0.29.3
func NewHeightOutOfRangeError ¶ added in v0.29.3
func NewInvalidTransactionError ¶ added in v0.29.3
func NewRecoverableError ¶ added in v0.29.3
func NewTxGasPriceTooLowError ¶ added in v0.29.3
Types ¶
type RevertError ¶
type RevertError struct { Reason string // revert reason hex encoded // contains filtered or unexported fields }
RevertError is an API error that encompasses an EVM revert with JSON error code and a binary data blob. We need this custom error type defined because the Geth server implementation expects this type when serialising the error API response.
func NewRevertError ¶
func NewRevertError(revert []byte) *RevertError
NewRevertError creates a revertError instance with the provided revert data.
func (*RevertError) ErrorCode ¶
func (e *RevertError) ErrorCode() int
ErrorCode returns the JSON error code for a revert. See: https://github.com/ethereum/wiki/wiki/JSON-RPC-Error-Codes-Improvement-Proposal
func (*RevertError) ErrorData ¶
func (e *RevertError) ErrorData() interface{}
ErrorData returns the hex encoded revert reason.
Click to show internal directories.
Click to hide internal directories.