state

package
v0.0.0-...-a885b07 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DesignStateValueHint = hint.MustNewHint("mitum-point-design-state-value-v0.0.1")
	DesignSuffix         = "design"
)
View Source
var (
	PointBalanceStateValueHint = hint.MustNewHint("mitum-point-balance-state-value-v0.0.1")
	PointBalanceSuffix         = "pointbalance"
)
View Source
var PointPrefix = "point"

Functions

func ErrStringStateNotFound

func ErrStringStateNotFound(k string) string

func IsStateDesignKey

func IsStateDesignKey(key string) bool

func IsStatePointBalanceKey

func IsStatePointBalanceKey(key string) bool

func StateDesignValue

func StateDesignValue(st base.State) (*types.Design, error)

func StateKeyDesign

func StateKeyDesign(contract base.Address) string

func StateKeyPointBalance

func StateKeyPointBalance(contract base.Address, address base.Address) string

func StateKeyPointPrefix

func StateKeyPointPrefix(contract base.Address) string

func StatePointBalanceValue

func StatePointBalanceValue(st base.State) (common.Big, error)

Types

type AddPointBalanceStateValue

type AddPointBalanceStateValue struct {
	Amount common.Big
}

func NewAddPointBalanceStateValue

func NewAddPointBalanceStateValue(amount common.Big) AddPointBalanceStateValue

func (AddPointBalanceStateValue) HashBytes

func (b AddPointBalanceStateValue) HashBytes() []byte

func (AddPointBalanceStateValue) IsValid

func (b AddPointBalanceStateValue) IsValid([]byte) error

type DeductPointBalanceStateValue

type DeductPointBalanceStateValue struct {
	Amount common.Big
}

func NewDeductPointBalanceStateValue

func NewDeductPointBalanceStateValue(amount common.Big) DeductPointBalanceStateValue

func (DeductPointBalanceStateValue) HashBytes

func (b DeductPointBalanceStateValue) HashBytes() []byte

func (DeductPointBalanceStateValue) IsValid

type DesignStateValue

type DesignStateValue struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDesignStateValue

func NewDesignStateValue(design types.Design) DesignStateValue

func (*DesignStateValue) DecodeBSON

func (s *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DesignStateValue) DecodeJSON

func (s *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DesignStateValue) HashBytes

func (s DesignStateValue) HashBytes() []byte

func (DesignStateValue) Hint

func (s DesignStateValue) Hint() hint.Hint

func (DesignStateValue) IsValid

func (s DesignStateValue) IsValid([]byte) error

func (DesignStateValue) MarshalBSON

func (s DesignStateValue) MarshalBSON() ([]byte, error)

func (DesignStateValue) MarshalJSON

func (s DesignStateValue) MarshalJSON() ([]byte, error)

type DesignStateValueBSONUnmarshaler

type DesignStateValueBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Design bson.Raw `bson:"design"`
}

type DesignStateValueJSONMarshaler

type DesignStateValueJSONMarshaler struct {
	hint.BaseHinter
	Design types.Design `json:"design"`
}

type DesignStateValueJSONUnmarshaler

type DesignStateValueJSONUnmarshaler struct {
	Design json.RawMessage `json:"design"`
}

type PointBalanceStateValue

type PointBalanceStateValue struct {
	hint.BaseHinter
	Amount common.Big
}

func NewPointBalanceStateValue

func NewPointBalanceStateValue(amount common.Big) PointBalanceStateValue

func (*PointBalanceStateValue) DecodeBSON

func (s *PointBalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*PointBalanceStateValue) DecodeJSON

func (s *PointBalanceStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (PointBalanceStateValue) HashBytes

func (s PointBalanceStateValue) HashBytes() []byte

func (PointBalanceStateValue) Hint

func (s PointBalanceStateValue) Hint() hint.Hint

func (PointBalanceStateValue) IsValid

func (s PointBalanceStateValue) IsValid([]byte) error

func (PointBalanceStateValue) MarshalBSON

func (s PointBalanceStateValue) MarshalBSON() ([]byte, error)

func (PointBalanceStateValue) MarshalJSON

func (s PointBalanceStateValue) MarshalJSON() ([]byte, error)

type PointBalanceStateValueBSONUnmarshaler

type PointBalanceStateValueBSONUnmarshaler struct {
	Hint   string `bson:"_hint"`
	Amount string `bson:"amount"`
}

type PointBalanceStateValueJSONMarshaler

type PointBalanceStateValueJSONMarshaler struct {
	hint.BaseHinter
	Amount common.Big `json:"amount"`
}

type PointBalanceStateValueJSONUnmarshaler

type PointBalanceStateValueJSONUnmarshaler struct {
	Amount string `json:"amount"`
}

type PointBalanceStateValueMerger

type PointBalanceStateValueMerger struct {
	*common.BaseStateValueMerger

	sync.Mutex
	// contains filtered or unexported fields
}

func NewPointBalanceStateValueMerger

func NewPointBalanceStateValueMerger(height base.Height, key string, st base.State) *PointBalanceStateValueMerger

func (*PointBalanceStateValueMerger) CloseValue

func (s *PointBalanceStateValueMerger) CloseValue() (base.State, error)

func (*PointBalanceStateValueMerger) Merge

type StateKeyGenerator

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

func NewStateKeyGenerator

func NewStateKeyGenerator(contract base.Address) StateKeyGenerator

func (StateKeyGenerator) Design

func (g StateKeyGenerator) Design() string

func (StateKeyGenerator) PointBalance

func (g StateKeyGenerator) PointBalance(address base.Address) string

Jump to

Keyboard shortcuts

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