builtin

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 15 Imported by: 7

Documentation

Overview

Package builtin is implementation of builtin contracts engine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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,
) (
	[]byte, error,
)

Directories

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

Jump to

Keyboard shortcuts

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