stack

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmptyError

type EmptyError struct{}

func (EmptyError) Error

func (e EmptyError) Error() string

type Flat

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

func FlatFromTupleChain

func FlatFromTupleChain(val value.Value) *Flat

func NewEmptyFlat

func NewEmptyFlat() *Flat

func (*Flat) Clone

func (f *Flat) Clone() Stack

func (*Flat) CloneImpl

func (f *Flat) CloneImpl() *Flat

func (*Flat) Count

func (f *Flat) Count() int64

func (*Flat) Equal

func (f *Flat) Equal(yin Stack) (bool, string)

func (*Flat) FullyExpandedValue

func (f *Flat) FullyExpandedValue() value.Value

func (*Flat) FullyExpandedValueImpl

func (f *Flat) FullyExpandedValueImpl() value.Value

func (*Flat) IsEmpty

func (f *Flat) IsEmpty() bool

func (*Flat) Pop

func (f *Flat) Pop() (value.Value, error)

func (*Flat) PopCodePoint

func (f *Flat) PopCodePoint() (val value.CodePointValue, err error)

func (*Flat) PopHashOnly

func (f *Flat) PopHashOnly() (val value.HashOnlyValue, err error)

func (*Flat) PopInt

func (f *Flat) PopInt() (val value.IntValue, err error)

func (*Flat) PopTuple

func (f *Flat) PopTuple() (value.TupleValue, error)

func (*Flat) ProofValue

func (f *Flat) ProofValue(stackInfo []byte) value.Value

func (*Flat) Push

func (f *Flat) Push(val value.Value)

func (*Flat) PushCodePoint

func (f *Flat) PushCodePoint(v value.CodePointValue)

func (*Flat) PushHashOnly

func (f *Flat) PushHashOnly(b value.HashOnlyValue)

func (*Flat) PushInt

func (f *Flat) PushInt(v value.IntValue)

func (*Flat) PushTuple

func (f *Flat) PushTuple(v value.TupleValue)

func (*Flat) Size

func (f *Flat) Size() int64

func (*Flat) SolidityProofValue

func (f *Flat) SolidityProofValue(stackInfo []byte) (value.HashOnlyValue, []value.Value)

func (*Flat) StateValue

func (f *Flat) StateValue() value.Value

func (*Flat) String

func (f *Flat) String() string

type Stack

type Stack interface {
	Clone() Stack

	Push(value.Value)
	PushInt(value.IntValue)
	PushTuple(value.TupleValue)
	PushCodePoint(value.CodePointValue)

	Pop() (value.Value, error) // Only error than can return is EmptyError
	PopInt() (value.IntValue, error)
	PopTuple() (value.TupleValue, error)
	PopCodePoint() (value.CodePointValue, error)

	Equal(Stack) (bool, string) // current usage is for testing only. Revisit return value if other usage identified
	IsEmpty() bool
	Size() int64
	Count() int64

	StateValue() value.Value
	ProofValue([]byte) value.Value
	SolidityProofValue([]byte) (value.HashOnlyValue, []value.Value)
	FullyExpandedValue() value.Value
}

type Tuple

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

func NewTuple

func NewTuple(stack value.Value) *Tuple

func (*Tuple) Clone

func (m *Tuple) Clone() Stack

func (*Tuple) Count

func (m *Tuple) Count() int64

func (*Tuple) Equal

func (m *Tuple) Equal(yin Stack) (bool, string)

func (*Tuple) FullyExpandedValue

func (m *Tuple) FullyExpandedValue() value.Value

func (*Tuple) IsEmpty

func (m *Tuple) IsEmpty() bool

func (*Tuple) Pop

func (m *Tuple) Pop() (value.Value, error)

func (*Tuple) PopCodePoint

func (m *Tuple) PopCodePoint() (value.CodePointValue, error)

func (*Tuple) PopInt

func (m *Tuple) PopInt() (value.IntValue, error)

func (*Tuple) PopTuple

func (m *Tuple) PopTuple() (value.TupleValue, error)

func (*Tuple) ProofValue

func (m *Tuple) ProofValue(stackInfo []byte) value.Value

func (*Tuple) Push

func (m *Tuple) Push(v value.Value)

func (*Tuple) PushCodePoint

func (m *Tuple) PushCodePoint(v value.CodePointValue)

func (*Tuple) PushInt

func (m *Tuple) PushInt(v value.IntValue)

func (*Tuple) PushTuple

func (m *Tuple) PushTuple(v value.TupleValue)

func (*Tuple) Size

func (m *Tuple) Size() int64

func (*Tuple) SolidityProofValue

func (m *Tuple) SolidityProofValue(stackInfo []byte) (value.HashOnlyValue, []value.Value)

func (*Tuple) StateValue

func (m *Tuple) StateValue() value.Value

func (*Tuple) String

func (m *Tuple) String() string

type TypeError

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

func (TypeError) Error

func (e TypeError) Error() string

Jump to

Keyboard shortcuts

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