builtin

package
v0.9.10 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package builtin is implementation of builtin contracts engine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeCodeDescriptors added in v0.9.0

func InitializeCodeDescriptors() []XXX_artifacts.CodeDescriptor

func InitializeCodeRefs added in v0.9.0

func InitializeCodeRefs() map[XXX_insolar.Reference]string

func InitializeContractMethods added in v0.9.0

func InitializeContractMethods() map[string]XXX_insolar.ContractWrapper

func InitializePrototypeDescriptors added in v0.9.0

func InitializePrototypeDescriptors() []XXX_artifacts.ObjectDescriptor

func InitializePrototypeRefs added in v0.9.5

func InitializePrototypeRefs() map[XXX_insolar.Reference]string

Types

type BuiltIn

type BuiltIn struct {
	// Prototype -> Code + Versions
	// PrototypeRegistry    map[string]preprocessor.ContractWrapper
	// PrototypeRefRegistry map[insolar.Reference]string
	// Code ->
	CodeRegistry         map[string]insolar.ContractWrapper
	CodeRefRegistry      map[insolar.Reference]string
	PrototypeRefRegistry map[insolar.Reference]string
}

BuiltIn is a contract runner engine

func NewBuiltIn

func NewBuiltIn(am artifacts.Client, stub LogicRunnerRPCStub) *BuiltIn

NewBuiltIn is an constructor

func (*BuiltIn) CallConstructor

func (b *BuiltIn) CallConstructor(
	ctx context.Context, callCtx *insolar.LogicCallContext, codeRef insolar.Reference,
	name string, args insolar.Arguments,
) ([]byte, insolar.Arguments, error)

func (*BuiltIn) CallMethod

func (b *BuiltIn) CallMethod(ctx context.Context, callCtx *insolar.LogicCallContext, codeRef insolar.Reference,
	data []byte, method string, args insolar.Arguments) ([]byte, insolar.Arguments, error)

type ProxyHelper added in v0.9.0

type ProxyHelper struct {
	lrCommon.Serializer
	lrCommon.SystemError
	// contains filtered or unexported fields
}

func NewProxyHelper added in v0.9.0

func NewProxyHelper(runner lrCommon.LogicRunnerRPCStub) *ProxyHelper

func (*ProxyHelper) DeactivateObject added in v0.9.0

func (h *ProxyHelper) DeactivateObject(object insolar.Reference) error

func (*ProxyHelper) MakeErrorSerializable added in v0.9.0

func (h *ProxyHelper) MakeErrorSerializable(err error) error

func (*ProxyHelper) RouteCall added in v0.9.0

func (h *ProxyHelper) RouteCall(ref insolar.Reference, immutable bool, saga bool, method string, args []byte,
	proxyPrototype insolar.Reference) ([]byte, error)

func (*ProxyHelper) SaveAsChild added in v0.9.0

func (h *ProxyHelper) SaveAsChild(
	parentRef, classRef insolar.Reference,
	constructorName string, argsSerialized []byte,
) (
	*insolar.Reference, []byte, error,
)

Directories

Path Synopsis
contract
Package foundation server implementation of smartcontract functions
Package foundation server implementation of smartcontract functions
proxy

Jump to

Keyboard shortcuts

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