invoker

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCacheSize

func WithCacheSize(size uint64) func(*Config)

Types

type Cache

type Cache interface {
	Get(key interface{}) (interface{}, bool)
	Set(key, value interface{}, cost int64) bool
}

type Config

type Config struct {
	CacheSize uint64
}

type Invoker

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

func New

func New(index dps.Reader, options ...func(*Config)) (*Invoker, error)

func (*Invoker) GetAccount

func (i *Invoker) GetAccount(address flow.Address, height uint64) (*flow.Account, error)

func (*Invoker) Script

func (i *Invoker) Script(height uint64, script []byte, arguments []cadence.Value) (cadence.Value, error)

type VirtualMachine

type VirtualMachine interface {
	Run(ctx fvm.Context, proc fvm.Procedure, v state.View, programs *programs.Programs) error
	GetAccount(ctx fvm.Context, address flow.Address, v state.View, programs *programs.Programs) (*flow.Account, error)
}

Jump to

Keyboard shortcuts

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