vm

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosVM

type CosVM struct {
	Vm *exec.VM
	// contains filtered or unexported fields
}

func NewCosVM

func NewCosVM(ctx *vmcontext.Context, db iservices.IDatabaseRW, props *prototype.DynamicProperties, logger *logrus.Logger) *CosVM

func (*CosVM) Run

func (w *CosVM) Run() (ret uint32, err error)

func (*CosVM) SpentGas

func (w *CosVM) SpentGas() uint64

func (*CosVM) Validate

func (w *CosVM) Validate() error

type CosVMNative

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

func NewCosVMNative

func NewCosVMNative(vm *CosVM) *CosVMNative

func (*CosVMNative) ContractCall

func (w *CosVMNative) ContractCall(owner, contract, method string, paramsData []byte, coins uint64)

func (*CosVMNative) ContractCalledByUser

func (w *CosVMNative) ContractCalledByUser() bool

func (*CosVMNative) ContractTransferToContract

func (w *CosVMNative) ContractTransferToContract(owner, contract string, amount uint64)

func (*CosVMNative) ContractTransferToUser

func (w *CosVMNative) ContractTransferToUser(to string, amount uint64)

func (*CosVMNative) ContractTransferToUserVest added in v1.0.4

func (w *CosVMNative) ContractTransferToUserVest(to string, amount uint64)

func (*CosVMNative) CosAbort

func (w *CosVMNative) CosAbort()

func (*CosVMNative) CosAssert

func (w *CosVMNative) CosAssert(condition bool, msg string)

func (*CosVMNative) CurrentBlockNumber

func (w *CosVMNative) CurrentBlockNumber() uint64

func (*CosVMNative) CurrentBlockProducer

func (w *CosVMNative) CurrentBlockProducer() string

func (*CosVMNative) CurrentTimestamp

func (w *CosVMNative) CurrentTimestamp() uint64

func (*CosVMNative) GetBlockProducers

func (w *CosVMNative) GetBlockProducers() string

func (*CosVMNative) GetContractBalance

func (w *CosVMNative) GetContractBalance(contract string, name string) uint64

func (*CosVMNative) GetCopyrightAdmin

func (w *CosVMNative) GetCopyrightAdmin() (name string)

func (*CosVMNative) GetReputationAdmin

func (w *CosVMNative) GetReputationAdmin() (name string)

func (*CosVMNative) GetUserBalance

func (w *CosVMNative) GetUserBalance(name string) uint64

func (*CosVMNative) PrintInt64

func (w *CosVMNative) PrintInt64(value int64)

func (*CosVMNative) PrintString

func (w *CosVMNative) PrintString(str string)

func (*CosVMNative) PrintUint64

func (w *CosVMNative) PrintUint64(value uint64)

func (*CosVMNative) ReadCallingContractName

func (w *CosVMNative) ReadCallingContractName() string

func (*CosVMNative) ReadCallingContractOwner

func (w *CosVMNative) ReadCallingContractOwner() string

func (*CosVMNative) ReadContractCaller

func (w *CosVMNative) ReadContractCaller() string

func (*CosVMNative) ReadContractMethod

func (w *CosVMNative) ReadContractMethod() string

func (*CosVMNative) ReadContractName

func (w *CosVMNative) ReadContractName() string

func (*CosVMNative) ReadContractOpParams

func (w *CosVMNative) ReadContractOpParams() string

func (*CosVMNative) ReadContractOwner

func (w *CosVMNative) ReadContractOwner() string

func (*CosVMNative) ReadContractSenderValue

func (w *CosVMNative) ReadContractSenderValue() uint64

func (*CosVMNative) RequiredAuth

func (w *CosVMNative) RequiredAuth(name string)

func (*CosVMNative) SetCopyrightAdmin

func (w *CosVMNative) SetCopyrightAdmin(name string)

func (*CosVMNative) SetReputationAdmin

func (w *CosVMNative) SetReputationAdmin(name string)

func (*CosVMNative) SetUserCopyright

func (w *CosVMNative) SetUserCopyright(postId uint64, value uint32, memo string)

func (*CosVMNative) SetUserFreeze

func (w *CosVMNative) SetUserFreeze(name string, value uint32, memo string)

func (*CosVMNative) SetUserReputation

func (w *CosVMNative) SetUserReputation(name string, value uint32, memo string)

func (*CosVMNative) TableDeleteRecord

func (w *CosVMNative) TableDeleteRecord(tableName string, primary []byte)

func (*CosVMNative) TableGetRecord

func (w *CosVMNative) TableGetRecord(tableName string, primary []byte) []byte

func (*CosVMNative) TableGetRecordEx

func (w *CosVMNative) TableGetRecordEx(ownerName, contractName, tableName string, primary []byte) []byte

func (*CosVMNative) TableNewRecord

func (w *CosVMNative) TableNewRecord(tableName string, record []byte)

func (*CosVMNative) TableUpdateRecord

func (w *CosVMNative) TableUpdateRecord(tableName string, primary []byte, record []byte)

func (*CosVMNative) UserExist

func (w *CosVMNative) UserExist(name string) bool

Directories

Path Synopsis
contract
abi
copy from wagon/validate and customized it Copyright 2017 The go-interpreter Authors.
copy from wagon/validate and customized it Copyright 2017 The go-interpreter Authors.

Jump to

Keyboard shortcuts

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