views

package
v0.0.0-...-b1b3a06 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNodeReturn = errors.New(`Node return error`)
)

errors

Functions

func NormalizeName

func NormalizeName(name string) string

NormalizeName -

Types

type Args

type Args struct {
	Protocol                 string
	Contract                 string
	Parameters               string
	Source                   string
	Initiator                string
	ChainID                  string
	HardGasLimitPerOperation int64
	Amount                   int64
}

Args -

type MichelsonStorageView

type MichelsonStorageView struct {
	Parameter  []byte
	Code       []byte
	ReturnType []byte
	Name       string
	// contains filtered or unexported fields
}

MichelsonStorageView -

func NewMichelsonStorageView

func NewMichelsonStorageView(impl contract.ViewImplementation, name string, storageType, storageValue []byte) *MichelsonStorageView

NewMichelsonStorageView -

func (*MichelsonStorageView) Execute

func (msv *MichelsonStorageView) Execute(ctx context.Context, rpc noderpc.INode, args Args) ([]byte, error)

Execute -

func (*MichelsonStorageView) Return

func (msv *MichelsonStorageView) Return() []byte

Return -

type Name

type Name struct {
	Value string `json:"string"`
}

Name -

type OnChain

type OnChain struct {
	Name       Name
	Parameter  stdJSON.RawMessage
	ReturnType stdJSON.RawMessage
	Code       stdJSON.RawMessage
}

OnChain -

func (*OnChain) Execute

func (onChain *OnChain) Execute(ctx context.Context, rpc noderpc.INode, args Args) ([]byte, error)

Execute -

func (*OnChain) Return

func (onChain *OnChain) Return() []byte

Return -

func (*OnChain) UnmarshalJSON

func (onChain *OnChain) UnmarshalJSON(data []byte) error

UnmarshalJSON -

func (OnChain) ViewName

func (onChain OnChain) ViewName() string

ViewName -

type View

type View interface {
	Return() []byte
	Execute(ctx context.Context, rpc noderpc.INode, args Args) ([]byte, error)
}

View -

Jump to

Keyboard shortcuts

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