foundation

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package foundation server implementation of smartcontract functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Call

func Call(Reference core.RecordRef, MethodName string, Arguments []interface{}) ([]interface{}, error)

Call other contract via network dispatcher

func GetImplementationFor

func GetImplementationFor(object, ofType core.RecordRef) (core.RecordRef, error)

GetImplementationFor finds delegate typed r in object and returns it

Types

type BaseContract

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

BaseContract is a base class for all contracts.

func (*BaseContract) GetChildrenTyped

func (bc *BaseContract) GetChildrenTyped(r core.RecordRef) ([]core.RecordRef, error)

GetChildrenTyped returns set of children objects with corresponding type

func (*BaseContract) GetClass added in v0.0.6

func (bc *BaseContract) GetClass() core.RecordRef

GetClass - Returns class of contract

func (*BaseContract) GetContext

func (bc *BaseContract) GetContext() core.LogicCallContext

GetContext returns current calling context of this object. It exists only for currently called contract.

func (*BaseContract) GetReference added in v0.0.6

func (bc *BaseContract) GetReference() core.RecordRef

GetReference - Returns public reference of contract

func (*BaseContract) SelfDestructRequest

func (bc *BaseContract) SelfDestructRequest()

SelfDestructRequest contract will be marked as deleted after call finishes

func (*BaseContract) SetContext

func (bc *BaseContract) SetContext(cc *core.LogicCallContext)

SetContext - do not use it in smartcontracts

type BaseContractInterface

type BaseContractInterface interface {
	GetReference() core.RecordRef
	GetClass() core.RecordRef
}

BaseContractInterface is an interface to deal with any contract same way

type CBORMarshaler

type CBORMarshaler interface {
	Marshal(interface{}) ([]byte, error)
	Unmarshal(interface{}, []byte) error
}

CBORMarshaler is a special interface for serializer object

type ProxyInterface added in v0.0.6

type ProxyInterface interface {
	GetReference() core.RecordRef
	GetClass() core.RecordRef
}

ProxyInterface interface any proxy of a contract implements

func GetObject

func GetObject(ref core.RecordRef) ProxyInterface

GetObject create proxy by address unimplemented

Jump to

Keyboard shortcuts

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