foundation

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2018 License: Apache-2.0 Imports: 3 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 GetContext added in v0.4.0

func GetContext() *core.LogicCallContext

GetContext returns current calling context.

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 {
}

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 OBSOLETED.

func (*BaseContract) GetReference added in v0.0.6

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

GetReference - Returns public reference of contract

func (*BaseContract) SelfDestruct added in v0.6.0

func (bc *BaseContract) SelfDestruct()

SelfDestruct contract will be marked as deleted

type BaseContractInterface

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

BaseContractInterface is an interface to deal with any contract same way

type Error added in v0.4.0

type Error struct {
	S string
}

Error elementary string based error struct satisfying builtin error interface

foundation.Error{"some err"}

func (*Error) Error added in v0.4.0

func (e *Error) Error() string

Error returns error in string format

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