types

package
v0.62.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAccessError added in v0.50.0

func ConvertAccessError(err error) error

Types

type AccountNotFoundError added in v0.50.0

type AccountNotFoundError struct {
	Address flowgo.Address
}

An AccountNotFoundError indicates that an account could not be found.

func (*AccountNotFoundError) Error added in v0.50.0

func (e *AccountNotFoundError) Error() string

type BlockNotFoundByHeightError added in v0.50.0

type BlockNotFoundByHeightError struct {
	Height uint64
}

A BlockNotFoundByHeightError indicates that a block could not be found at the specified height.

func (*BlockNotFoundByHeightError) Error added in v0.50.0

type BlockNotFoundByIDError added in v0.50.0

type BlockNotFoundByIDError struct {
	ID flowgo.Identifier
}

A BlockNotFoundByIDError indicates that a block with the specified ID could not be found.

func (*BlockNotFoundByIDError) Error added in v0.50.0

func (e *BlockNotFoundByIDError) Error() string

type BlockNotFoundError added in v0.50.0

type BlockNotFoundError interface {
	// contains filtered or unexported methods
}

A BlockNotFoundError indicates that a block could not be found.

type CollectionNotFoundError added in v0.50.0

type CollectionNotFoundError struct {
	ID flowgo.Identifier
}

A CollectionNotFoundError indicates that a collection could not be found.

func (*CollectionNotFoundError) Error added in v0.50.0

func (e *CollectionNotFoundError) Error() string

type DuplicateTransactionError added in v0.50.0

type DuplicateTransactionError struct {
	TxID flowgo.Identifier
}

A DuplicateTransactionError indicates that a transaction has already been submitted.

func (*DuplicateTransactionError) Error added in v0.50.0

func (e *DuplicateTransactionError) Error() string

type ExecutionError added in v0.50.0

type ExecutionError struct {
	Code    int
	Message string
}

An ExecutionError occurs when a transaction fails to execute.

func (*ExecutionError) Error added in v0.50.0

func (e *ExecutionError) Error() string

type ExpiredTransactionError added in v0.50.0

type ExpiredTransactionError struct {
	RefHeight, FinalHeight uint64
}

ExpiredTransactionError indicates that a transaction has expired.

func (*ExpiredTransactionError) Error added in v0.50.0

func (e *ExpiredTransactionError) Error() string

type FVMError added in v0.50.0

type FVMError struct {
	FlowError fvmerrors.CodedError
}

func (*FVMError) Error added in v0.50.0

func (f *FVMError) Error() string

func (*FVMError) Unwrap added in v0.50.0

func (f *FVMError) Unwrap() error

type IncompleteTransactionError added in v0.50.0

type IncompleteTransactionError struct {
	MissingFields []string
}

IncompleteTransactionError indicates that a transaction is missing one or more required fields.

func (*IncompleteTransactionError) Error added in v0.50.0

type InternalError added in v0.50.0

type InternalError struct {
	// contains filtered or unexported fields
}

func NewInternalError added in v0.50.0

func NewInternalError(msg string) *InternalError

func (InternalError) Error added in v0.50.0

func (e InternalError) Error() string

type InvalidArgumentError added in v0.50.0

type InvalidArgumentError struct {
	// contains filtered or unexported fields
}

func NewInvalidArgumentError added in v0.50.0

func NewInvalidArgumentError(msg string) *InvalidArgumentError

func (InvalidArgumentError) Error added in v0.50.0

func (e InvalidArgumentError) Error() string

type InvalidStateVersionError added in v0.50.0

type InvalidStateVersionError struct {
	Version crypto.Hash
}

An InvalidStateVersionError indicates that a state version hash provided is invalid.

func (*InvalidStateVersionError) Error added in v0.50.0

func (e *InvalidStateVersionError) Error() string

type InvalidTransactionGasLimitError added in v0.50.0

type InvalidTransactionGasLimitError struct {
	Maximum uint64
	Actual  uint64
}

InvalidTransactionGasLimitError indicates that a transaction specifies a gas limit that exceeds the maximum.

func (*InvalidTransactionGasLimitError) Error added in v0.50.0

type InvalidTransactionScriptError added in v0.50.0

type InvalidTransactionScriptError struct {
	ParserErr error
}

InvalidTransactionScriptError indicates that a transaction contains an invalid Cadence script.

func (*InvalidTransactionScriptError) Error added in v0.50.0

func (*InvalidTransactionScriptError) Unwrap added in v0.50.0

type NotFoundError added in v0.50.0

type NotFoundError interface {
	// contains filtered or unexported methods
}

A NotFoundError indicates that an entity could not be found.

type PendingBlockCommitBeforeExecutionError added in v0.50.0

type PendingBlockCommitBeforeExecutionError struct {
	BlockID flowgo.Identifier
}

A PendingBlockCommitBeforeExecutionError indicates that the current pending block has not been executed (cannot commit).

func (*PendingBlockCommitBeforeExecutionError) Error added in v0.50.0

type PendingBlockMidExecutionError added in v0.50.0

type PendingBlockMidExecutionError struct {
	BlockID flowgo.Identifier
}

A PendingBlockMidExecutionError indicates that the current pending block is mid-execution.

func (*PendingBlockMidExecutionError) Error added in v0.50.0

type PendingBlockTransactionsExhaustedError added in v0.50.0

type PendingBlockTransactionsExhaustedError struct {
	BlockID flowgo.Identifier
}

A PendingBlockTransactionsExhaustedError indicates that the current pending block has finished executing (no more transactions to execute).

func (*PendingBlockTransactionsExhaustedError) Error added in v0.50.0

type ScriptResult

type ScriptResult struct {
	ScriptID        flowsdk.Identifier
	Value           cadence.Value
	Error           error
	Logs            []string
	Events          []flowsdk.Event
	ComputationUsed uint64
	MemoryEstimate  uint64
}

A ScriptResult is the result of executing a script.

func (ScriptResult) Reverted

func (r ScriptResult) Reverted() bool

Reverted returns true if the script executed with errors.

func (ScriptResult) Succeeded

func (r ScriptResult) Succeeded() bool

Succeeded returns true if the script executed without errors.

type StorableTransactionResult

type StorableTransactionResult struct {
	ErrorCode    int
	ErrorMessage string
	Logs         []string
	Events       []flowgo.Event
	BlockID      flowgo.Identifier
	BlockHeight  uint64
}

type StorageError added in v0.50.0

type StorageError struct {
	// contains filtered or unexported fields
}

A StorageError indicates that an error occurred in the storage provider.

func (*StorageError) Error added in v0.50.0

func (e *StorageError) Error() string

func (*StorageError) Unwrap added in v0.50.0

func (e *StorageError) Unwrap() error

type TransactionNotFoundError added in v0.50.0

type TransactionNotFoundError struct {
	ID flowgo.Identifier
}

A TransactionNotFoundError indicates that a transaction could not be found.

func (*TransactionNotFoundError) Error added in v0.50.0

func (e *TransactionNotFoundError) Error() string

type TransactionResult

type TransactionResult struct {
	TransactionID   flowsdk.Identifier
	ComputationUsed uint64
	MemoryEstimate  uint64
	Error           error
	Logs            []string
	Events          []flowsdk.Event
	Debug           *TransactionResultDebug
}

A TransactionResult is the result of executing a transaction.

func (TransactionResult) Reverted

func (r TransactionResult) Reverted() bool

Reverted returns true if the transaction executed with errors.

func (TransactionResult) Succeeded

func (r TransactionResult) Succeeded() bool

Succeeded returns true if the transaction executed without errors.

type TransactionResultDebug added in v0.25.0

type TransactionResultDebug struct {
	Message string
	Meta    map[string]any
}

TransactionResultDebug provides details about unsuccessful transaction execution

func NewTransactionInvalidHashAlgo added in v0.25.0

func NewTransactionInvalidHashAlgo(
	key flowgo.AccountPublicKey,
	address flowgo.Address,
	invalidAlgo cryptosdk.HashAlgorithm,
) *TransactionResultDebug

NewTransactionInvalidHashAlgo creates debug details for transactions with invalid hashing algorithm

func NewTransactionInvalidSignature added in v0.25.0

func NewTransactionInvalidSignature(
	tx *flowgo.TransactionBody,
) *TransactionResultDebug

NewTransactionInvalidSignature creates more debug details for transactions with invalid signature

type TransactionValidationError added in v0.50.0

type TransactionValidationError interface {
	// contains filtered or unexported methods
}

A TransactionValidationError indicates that a submitted transaction is invalid.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL