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") ErrExceedLogQueryLimit = errors.New("exceed max addresses or topics per search position") ErrInvalid = errors.New("invalid") ErrRecoverable = errors.New("recoverable") ErrDisconnected = NewRecoverableError(errors.New("disconnected")) ErrMissingBlock = errors.New("missing block") ErrMissingTransactions = errors.New("missing transactions") ErrInvalidParentHash = errors.New("invalid parent block hash") ErrFailedTransaction = errors.New("failed transaction") ErrInvalidTransaction = fmt.Errorf("%w: %w", ErrInvalid, ErrFailedTransaction) ErrDuplicateTransaction = fmt.Errorf("%w: %s", ErrInvalid, "transaction already in pool") // ErrInFlightNonce is returned when a transaction carries a nonce that has // already been submitted to the network and is awaiting execution. Letting // it through would burn Flow fees on a guaranteed nonce-mismatch failure. ErrInFlightNonce = fmt.Errorf("%w: %s", ErrInvalid, "transaction with the same nonce already submitted") // ErrNonceTooLow is returned when a transaction's nonce is below the EOA's // current on-chain nonce: it has already been used and can never execute. ErrNonceTooLow = fmt.Errorf("%w: %s", ErrInvalid, "nonce too low") // ErrNonceTooHigh is returned when a transaction's nonce is more than the // configured maximum gap ahead of the EOA's on-chain nonce. Such a tx cannot // execute until the gap fills, so it is rejected up front for fast feedback. ErrNonceTooHigh = fmt.Errorf("%w: %s", ErrInvalid, "nonce too high") // 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() any
ErrorData returns the hex encoded revert reason.
Click to show internal directories.
Click to hide internal directories.