service

package
v0.0.0-...-e920dd0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: MIT Imports: 26 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger elalog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using elalog.

Types

type NotifyEventArgs

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

func (*NotifyEventArgs) GetContainer

func (ent *NotifyEventArgs) GetContainer() interfaces.IDataContainer

func (*NotifyEventArgs) GetScriptHash

func (ent *NotifyEventArgs) GetScriptHash() common.Uint168

func (*NotifyEventArgs) GetStateItem

func (ent *NotifyEventArgs) GetStateItem() datatype.StackItem

type StateMachine

type StateMachine struct {
	*StateReader
	CloneCache *storage.CloneCache
}

func NewStateMachine

func NewStateMachine(dbCache storage.DBCache, innerCache storage.DBCache) *StateMachine

func (*StateMachine) AccountIsStandard

func (s *StateMachine) AccountIsStandard(e *avm.ExecutionEngine) bool

func (*StateMachine) AssetRenew

func (s *StateMachine) AssetRenew(engine *avm.ExecutionEngine) bool

func (*StateMachine) CheckStorageContext

func (s *StateMachine) CheckStorageContext(context *StorageContext) (bool, error)

func (*StateMachine) ContractDestory

func (s *StateMachine) ContractDestory(engine *avm.ExecutionEngine) bool

func (*StateMachine) ContractMigrate

func (s *StateMachine) ContractMigrate(engine *avm.ExecutionEngine) bool

func (*StateMachine) CreateAsset

func (s *StateMachine) CreateAsset(engine *avm.ExecutionEngine) bool

func (*StateMachine) CreateContract

func (s *StateMachine) CreateContract(engine *avm.ExecutionEngine) bool

func (*StateMachine) GetContract

func (s *StateMachine) GetContract(engine *avm.ExecutionEngine) bool

func (*StateMachine) GetStorageContext

func (s *StateMachine) GetStorageContext(engine *avm.ExecutionEngine) bool

func (*StateMachine) StorageDelete

func (s *StateMachine) StorageDelete(engine *avm.ExecutionEngine) bool

func (*StateMachine) StorageFind

func (s *StateMachine) StorageFind(engine *avm.ExecutionEngine) bool

func (*StateMachine) StorageGet

func (s *StateMachine) StorageGet(engine *avm.ExecutionEngine) bool

func (*StateMachine) StoragePut

func (s *StateMachine) StoragePut(engine *avm.ExecutionEngine) bool

type StateReader

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

func NewStateReader

func NewStateReader() *StateReader

func (*StateReader) AccountGetBalance

func (s *StateReader) AccountGetBalance(e *avm.ExecutionEngine) bool

func (*StateReader) AccountGetCodeHash

func (s *StateReader) AccountGetCodeHash(e *avm.ExecutionEngine) bool

func (*StateReader) AccountGetVotes

func (s *StateReader) AccountGetVotes(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetAdmin

func (s *StateReader) AssetGetAdmin(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetAmount

func (s *StateReader) AssetGetAmount(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetAssetId

func (s *StateReader) AssetGetAssetId(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetAssetType

func (s *StateReader) AssetGetAssetType(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetAvailable

func (s *StateReader) AssetGetAvailable(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetIssuer

func (s *StateReader) AssetGetIssuer(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetOwner

func (s *StateReader) AssetGetOwner(e *avm.ExecutionEngine) bool

func (*StateReader) AssetGetPrecision

func (s *StateReader) AssetGetPrecision(e *avm.ExecutionEngine) bool

func (*StateReader) AttributeGetData

func (s *StateReader) AttributeGetData(e *avm.ExecutionEngine) bool

func (*StateReader) AttributeGetUsage

func (s *StateReader) AttributeGetUsage(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetAccount

func (s *StateReader) BlockChainGetAccount(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetAsset

func (s *StateReader) BlockChainGetAsset(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetBlock

func (s *StateReader) BlockChainGetBlock(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetHeader

func (s *StateReader) BlockChainGetHeader(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetHeight

func (s *StateReader) BlockChainGetHeight(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetTransaction

func (s *StateReader) BlockChainGetTransaction(e *avm.ExecutionEngine) bool

func (*StateReader) BlockChainGetValidators

func (s *StateReader) BlockChainGetValidators(e *avm.ExecutionEngine) bool

func (*StateReader) BlockGetTransaction

func (s *StateReader) BlockGetTransaction(e *avm.ExecutionEngine) bool

func (*StateReader) BlockGetTransactions

func (s *StateReader) BlockGetTransactions(e *avm.ExecutionEngine) bool

func (*StateReader) BlockchainGetTransactionHeight

func (s *StateReader) BlockchainGetTransactionHeight(e *avm.ExecutionEngine) bool

func (*StateReader) BlockgetTransactionCount

func (s *StateReader) BlockgetTransactionCount(e *avm.ExecutionEngine) bool

func (*StateReader) CheckWitnessHash

func (s *StateReader) CheckWitnessHash(engine *avm.ExecutionEngine, programHash common.Uint168) (bool, error)

func (*StateReader) CheckWitnessHash160

func (s *StateReader) CheckWitnessHash160(engine *avm.ExecutionEngine, programHash []byte) (bool, error)

func (*StateReader) CheckWitnessPublicKey

func (s *StateReader) CheckWitnessPublicKey(engine *avm.ExecutionEngine, publicKey *crypto.PublicKey) (bool, error)

func (*StateReader) ContractGetCode

func (s *StateReader) ContractGetCode(e *avm.ExecutionEngine) bool

func (*StateReader) ContractIsPayable

func (s *StateReader) ContractIsPayable(e *avm.ExecutionEngine) bool

func (*StateReader) DerializeStackItem

func (s *StateReader) DerializeStackItem(r io.Reader) (datatype.StackItem, error)

func (*StateReader) EnumeratorNext

func (s *StateReader) EnumeratorNext(e *avm.ExecutionEngine) bool

func (*StateReader) EnumeratorValue

func (s *StateReader) EnumeratorValue(e *avm.ExecutionEngine) bool

func (*StateReader) GetNotifyEvents

func (s *StateReader) GetNotifyEvents() []NotifyEventArgs

func (*StateReader) GetServiceMap

func (s *StateReader) GetServiceMap() map[string]func(*avm.ExecutionEngine) bool

func (*StateReader) HeaderGetConsensusData

func (s *StateReader) HeaderGetConsensusData(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetHash

func (s *StateReader) HeaderGetHash(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetHeight

func (s *StateReader) HeaderGetHeight(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetMerkleRoot

func (s *StateReader) HeaderGetMerkleRoot(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetNextConsensus

func (s *StateReader) HeaderGetNextConsensus(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetPrevHash

func (s *StateReader) HeaderGetPrevHash(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetTimestamp

func (s *StateReader) HeaderGetTimestamp(e *avm.ExecutionEngine) bool

func (*StateReader) HeaderGetVersion

func (s *StateReader) HeaderGetVersion(e *avm.ExecutionEngine) bool

func (*StateReader) InputGetHash

func (s *StateReader) InputGetHash(e *avm.ExecutionEngine) bool

func (*StateReader) InputGetIndex

func (s *StateReader) InputGetIndex(e *avm.ExecutionEngine) bool

func (*StateReader) InvocationTransactionGetScript

func (s *StateReader) InvocationTransactionGetScript(e *avm.ExecutionEngine) bool

func (*StateReader) IteratorKey

func (s *StateReader) IteratorKey(e *avm.ExecutionEngine) bool

func (*StateReader) IteratorKeys

func (s *StateReader) IteratorKeys(e *avm.ExecutionEngine) bool

func (*StateReader) IteratorValues

func (s *StateReader) IteratorValues(e *avm.ExecutionEngine) bool

func (*StateReader) OutputGetAssetId

func (s *StateReader) OutputGetAssetId(e *avm.ExecutionEngine) bool

func (*StateReader) OutputGetCodeHash

func (s *StateReader) OutputGetCodeHash(e *avm.ExecutionEngine) bool

func (*StateReader) OutputGetValue

func (s *StateReader) OutputGetValue(e *avm.ExecutionEngine) bool

func (*StateReader) Register

func (s *StateReader) Register(methodName string, handler func(engine *avm.ExecutionEngine) bool) bool

func (*StateReader) RuntimeCheckWitness

func (s *StateReader) RuntimeCheckWitness(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeDerialize

func (s *StateReader) RuntimeDerialize(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeGetTime

func (s *StateReader) RuntimeGetTime(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeGetTrigger

func (s *StateReader) RuntimeGetTrigger(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeLog

func (s *StateReader) RuntimeLog(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeNotify

func (s *StateReader) RuntimeNotify(e *avm.ExecutionEngine) bool

func (*StateReader) RuntimeSerialize

func (s *StateReader) RuntimeSerialize(e *avm.ExecutionEngine) bool

func (*StateReader) SerializeStackItem

func (s *StateReader) SerializeStackItem(item datatype.StackItem, w io.Writer)

func (*StateReader) StorageContextAsReadOnly

func (s *StateReader) StorageContextAsReadOnly(e *avm.ExecutionEngine) bool

func (*StateReader) StorageGetContext

func (s *StateReader) StorageGetContext(e *avm.ExecutionEngine) bool

func (*StateReader) StorageGetReadOnlyContext

func (s *StateReader) StorageGetReadOnlyContext(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetAttributes

func (s *StateReader) TransactionGetAttributes(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetHash

func (s *StateReader) TransactionGetHash(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetInputs

func (s *StateReader) TransactionGetInputs(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetOutputs

func (s *StateReader) TransactionGetOutputs(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetReferences

func (s *StateReader) TransactionGetReferences(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetType

func (s *StateReader) TransactionGetType(e *avm.ExecutionEngine) bool

func (*StateReader) TransactionGetUnspentCoins

func (s *StateReader) TransactionGetUnspentCoins(e *avm.ExecutionEngine) bool

type StorageContext

type StorageContext struct {
	IsReadOnly bool
	// contains filtered or unexported fields
}

func NewStorageContext

func NewStorageContext(codeHash *common.Uint168) *StorageContext

func (*StorageContext) Bytes

func (sc *StorageContext) Bytes() []byte

func (*StorageContext) Deserialize

func (sc *StorageContext) Deserialize(r io.Reader) error

func (*StorageContext) Serialize

func (sc *StorageContext) Serialize(w io.Writer) error

Jump to

Keyboard shortcuts

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