Documentation
¶
Index ¶
- Constants
- type Executor
- type QueryConfig
- type QueryExecutor
- func (e *QueryExecutor) ExecuteScript(ctx context.Context, script []byte, arguments [][]byte, ...) (encodedValue []byte, computationUsed uint64, err error)
- func (e *QueryExecutor) GetAccount(_ context.Context, address flow.Address, blockHeader *flow.Header, ...) (*flow.Account, error)
- func (e *QueryExecutor) GetAccountAvailableBalance(_ context.Context, address flow.Address, blockHeader *flow.Header, ...) (uint64, error)
- func (e *QueryExecutor) GetAccountBalance(_ context.Context, address flow.Address, blockHeader *flow.Header, ...) (uint64, error)
- func (e *QueryExecutor) GetAccountKey(_ context.Context, address flow.Address, keyIndex uint32, ...) (*flow.AccountPublicKey, error)
- func (e *QueryExecutor) GetAccountKeys(_ context.Context, address flow.Address, blockHeader *flow.Header, ...) ([]flow.AccountPublicKey, error)
Constants ¶
View Source
const ( DefaultLogTimeThreshold = 1 * time.Second DefaultExecutionTimeLimit = 10 * time.Second DefaultMaxErrorMessageSize = 1000 // 1000 chars )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface {
ExecuteScript(
ctx context.Context,
script []byte,
arguments [][]byte,
blockHeader *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
[]byte,
uint64,
error,
)
GetAccount(
ctx context.Context,
addr flow.Address,
header *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
*flow.Account,
error,
)
GetAccountBalance(
ctx context.Context,
addr flow.Address,
header *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
uint64,
error,
)
GetAccountAvailableBalance(
ctx context.Context,
addr flow.Address,
header *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
uint64,
error,
)
GetAccountKeys(
ctx context.Context,
addr flow.Address,
header *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
[]flow.AccountPublicKey,
error,
)
GetAccountKey(
ctx context.Context,
addr flow.Address,
keyIndex uint32,
header *flow.Header,
snapshot snapshot.StorageSnapshot,
) (
*flow.AccountPublicKey,
error,
)
}
type QueryConfig ¶
type QueryConfig struct {
LogTimeThreshold time.Duration
ExecutionTimeLimit time.Duration
ComputationLimit uint64
MaxErrorMessageSize int
}
func NewDefaultConfig ¶
func NewDefaultConfig() QueryConfig
type QueryExecutor ¶
type QueryExecutor struct {
// contains filtered or unexported fields
}
func NewQueryExecutor ¶
func NewQueryExecutor( config QueryConfig, logger zerolog.Logger, metrics module.ExecutionMetrics, vm fvm.VM, vmCtx fvm.Context, derivedChainData *derived.DerivedChainData, protocolStateSnapshot protocol.SnapshotExecutionSubsetProvider, ) *QueryExecutor
func (*QueryExecutor) ExecuteScript ¶
func (*QueryExecutor) GetAccount ¶
func (*QueryExecutor) GetAccountAvailableBalance ¶ added in v0.36.1
func (*QueryExecutor) GetAccountBalance ¶ added in v0.35.17
func (*QueryExecutor) GetAccountKey ¶ added in v0.36.1
func (e *QueryExecutor) GetAccountKey( _ context.Context, address flow.Address, keyIndex uint32, blockHeader *flow.Header, snapshot snapshot.StorageSnapshot, ) (*flow.AccountPublicKey, error)
func (*QueryExecutor) GetAccountKeys ¶ added in v0.35.17
func (e *QueryExecutor) GetAccountKeys( _ context.Context, address flow.Address, blockHeader *flow.Header, snapshot snapshot.StorageSnapshot, ) ([]flow.AccountPublicKey, error)
Click to show internal directories.
Click to hide internal directories.