lua

package
v0.0.0-...-17003a6 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VM

type VM struct {
	*base.VMBase
	// contains filtered or unexported fields
}

VM the implementation of BaseVM for lua.

func NewVM

func NewVM(base *base.VMBase) (vm *VM, err error)

NewVM use given base to create VM.

func (*VM) AfterRun

func (v *VM) AfterRun() error

AfterRun will call once after run.

func (*VM) BeforeDeploy

func (v *VM) BeforeDeploy() error

BeforeDeploy will call before deploy contract.

func (*VM) BeforeGet

func (v *VM) BeforeGet() error

BeforeGet will call before get context.

func (*VM) BeforeRun

func (v *VM) BeforeRun() error

BeforeRun will call once before run.

func (*VM) BeforeSet

func (v *VM) BeforeSet() error

BeforeSet will call before set context.

func (*VM) Close

func (v *VM) Close()

Close close vm.

func (*VM) DeployContract

func (v *VM) DeployContract() error

DeployContract deploy contract.

func (*VM) GetContext

func (v *VM) GetContext() ([]byte, error)

GetContext generate context for execute tx in vm.

func (*VM) LogStatus

func (v *VM) LogStatus() (end int64, err error)

LogStatus records blockheight and time

func (*VM) Run

func (v *VM) Run(ctx fcom.TxContext) (*fcom.Result, error)

Run create and send tx to client.

func (*VM) SetContext

func (v *VM) SetContext(ctx []byte) error

SetContext set context for execute tx in vm, the ctx is generated by GetContext.

func (*VM) Statistic

func (v *VM) Statistic(from, to int64) (*fcom.RemoteStatistic, error)

Statistic statistic remote execute info.

func (*VM) Type

func (v *VM) Type() string

Type return the type of vm

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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