runtime

package
v0.28.15-access-admin-... Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: AGPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Environment

type Environment interface {
	runtime.Interface

	SetAccountFrozen(address common.Address, frozen bool) error
}

Note: this is a subset of environment.Environment, redeclared to handle circular dependency.

type ReusableCadenceRuntime

type ReusableCadenceRuntime struct {
	runtime.Runtime
	runtime.Environment
	// contains filtered or unexported fields
}

func NewReusableCadenceRuntime

func NewReusableCadenceRuntime(rt runtime.Runtime) *ReusableCadenceRuntime

func (*ReusableCadenceRuntime) ExecuteScript

func (reusable *ReusableCadenceRuntime) ExecuteScript(
	script runtime.Script,
	location common.Location,
) (
	cadence.Value,
	error,
)

func (*ReusableCadenceRuntime) ExecuteTransaction

func (reusable *ReusableCadenceRuntime) ExecuteTransaction(
	script runtime.Script,
	location common.Location,
) error

func (*ReusableCadenceRuntime) InvokeContractFunction

func (reusable *ReusableCadenceRuntime) InvokeContractFunction(
	contractLocation common.AddressLocation,
	functionName string,
	arguments []cadence.Value,
	argumentTypes []sema.Type,
) (
	cadence.Value,
	error,
)

func (*ReusableCadenceRuntime) ReadStored

func (reusable *ReusableCadenceRuntime) ReadStored(
	address common.Address,
	path cadence.Path,
) (
	cadence.Value,
	error,
)

func (*ReusableCadenceRuntime) SetFvmEnvironment

func (reusable *ReusableCadenceRuntime) SetFvmEnvironment(fvmEnv Environment)

type ReusableCadenceRuntimePool

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

func NewCustomReusableCadenceRuntimePool

func NewCustomReusableCadenceRuntimePool(
	poolSize int,
	newCustomRuntime func() runtime.Runtime,
) ReusableCadenceRuntimePool

func NewReusableCadenceRuntimePool

func NewReusableCadenceRuntimePool(
	poolSize int,
	config runtime.Config,
) ReusableCadenceRuntimePool

func (ReusableCadenceRuntimePool) Borrow

func (ReusableCadenceRuntimePool) Return

func (pool ReusableCadenceRuntimePool) Return(
	reusable *ReusableCadenceRuntime,
)

type WrappedCadenceExecutor

type WrappedCadenceExecutor struct {
	runtime.Executor
}

func (WrappedCadenceExecutor) Execute

func (we WrappedCadenceExecutor) Execute() error

func (WrappedCadenceExecutor) Preprocess

func (we WrappedCadenceExecutor) Preprocess() error

func (WrappedCadenceExecutor) Result

func (we WrappedCadenceExecutor) Result() (cadence.Value, error)

type WrappedCadenceRuntime

type WrappedCadenceRuntime struct {
	runtime.Runtime
}

WrappedCadenceRuntime wraps cadence runtime to handle errors. Errors from cadence runtime should be handled with `errors.HandleRuntimeError` before the FVM can understand them. Handling all possible locations, where the error could be coming from, here, makes it impossible to forget to handle the error.

func (WrappedCadenceRuntime) ExecuteScript

func (WrappedCadenceRuntime) ExecuteTransaction

func (wr WrappedCadenceRuntime) ExecuteTransaction(s runtime.Script, c runtime.Context) error

func (WrappedCadenceRuntime) InvokeContractFunction

func (wr WrappedCadenceRuntime) InvokeContractFunction(
	contractLocation common.AddressLocation,
	functionName string,
	arguments []cadence.Value,
	argumentTypes []sema.Type,
	context runtime.Context,
) (cadence.Value, error)

func (WrappedCadenceRuntime) NewContractFunctionExecutor

func (wr WrappedCadenceRuntime) NewContractFunctionExecutor(
	contractLocation common.AddressLocation,
	functionName string,
	arguments []cadence.Value,
	argumentTypes []sema.Type,
	context runtime.Context,
) runtime.Executor

func (WrappedCadenceRuntime) NewScriptExecutor

func (wr WrappedCadenceRuntime) NewScriptExecutor(s runtime.Script, c runtime.Context) runtime.Executor

func (WrappedCadenceRuntime) NewTransactionExecutor

func (wr WrappedCadenceRuntime) NewTransactionExecutor(s runtime.Script, c runtime.Context) runtime.Executor

func (WrappedCadenceRuntime) ParseAndCheckProgram

func (wr WrappedCadenceRuntime) ParseAndCheckProgram(source []byte, context runtime.Context) (*interpreter.Program, error)

func (WrappedCadenceRuntime) ReadLinked

func (wr WrappedCadenceRuntime) ReadLinked(address common.Address, path cadence.Path, context runtime.Context) (cadence.Value, error)

func (WrappedCadenceRuntime) ReadStored

func (wr WrappedCadenceRuntime) ReadStored(address common.Address, path cadence.Path, context runtime.Context) (cadence.Value, error)

func (WrappedCadenceRuntime) Storage

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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