states

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: LGPL-3.0 Imports: 8 Imported by: 76

Documentation

Index

Constants

View Source
const DefaultVersion = 0
View Source
const ScaleDecimal9Version = 1
View Source
const ScaleFactor = 1000000000

Variables

This section is empty.

Functions

func GenRawStorageItem added in v1.5.1

func GenRawStorageItem(value []byte) []byte

func GetValueFromRawStorageItem added in v1.5.1

func GetValueFromRawStorageItem(raw []byte) ([]byte, error)

Types

type BookkeeperState

type BookkeeperState struct {
	StateBase
	CurrBookkeeper []keypair.PublicKey
	NextBookkeeper []keypair.PublicKey
}

func (*BookkeeperState) Deserialization added in v1.8.1

func (this *BookkeeperState) Deserialization(source *common.ZeroCopySource) error

func (*BookkeeperState) Serialization added in v1.8.1

func (this *BookkeeperState) Serialization(sink *common.ZeroCopySink)

func (*BookkeeperState) ToArray

func (v *BookkeeperState) ToArray() []byte

type NativeTokenBalance added in v1.14.1

type NativeTokenBalance struct {
	Balance bigint.Int
}

ont balance with decimal 9

func NativeTokenBalanceFromInteger added in v1.14.1

func NativeTokenBalanceFromInteger(val uint64) NativeTokenBalance

func NativeTokenBalanceFromStorageItem added in v1.14.1

func NativeTokenBalanceFromStorageItem(val *StorageItem) (NativeTokenBalance, error)

func (NativeTokenBalance) Add added in v1.14.1

func (NativeTokenBalance) FloatPart added in v1.14.1

func (self NativeTokenBalance) FloatPart() uint64

func (NativeTokenBalance) IsFloat added in v1.14.1

func (self NativeTokenBalance) IsFloat() bool

func (NativeTokenBalance) IsZero added in v1.14.1

func (self NativeTokenBalance) IsZero() bool

func (NativeTokenBalance) MustToInteger64 added in v1.14.1

func (self NativeTokenBalance) MustToInteger64() uint64

func (NativeTokenBalance) MustToStorageItem added in v1.14.1

func (self NativeTokenBalance) MustToStorageItem() *StorageItem

func (NativeTokenBalance) MustToStorageItemBytes added in v1.14.1

func (self NativeTokenBalance) MustToStorageItemBytes() []byte

func (*NativeTokenBalance) String added in v1.14.1

func (self *NativeTokenBalance) String() string

func (NativeTokenBalance) Sub added in v1.14.1

func (self NativeTokenBalance) Sub(rhs NativeTokenBalance) (result NativeTokenBalance, err error)

func (NativeTokenBalance) ToBigInt added in v1.14.1

func (self NativeTokenBalance) ToBigInt() *big.Int

func (NativeTokenBalance) ToInteger added in v1.14.1

func (self NativeTokenBalance) ToInteger() bigint.Int

type StateBase

type StateBase struct {
	StateVersion byte
}

func (*StateBase) Deserialization added in v1.8.1

func (this *StateBase) Deserialization(source *common.ZeroCopySource) error

func (*StateBase) Serialization added in v1.8.1

func (this *StateBase) Serialization(sink *common.ZeroCopySink)

type StorageItem

type StorageItem struct {
	StateBase
	Value []byte
}

func (*StorageItem) Deserialization added in v1.8.1

func (this *StorageItem) Deserialization(source *common.ZeroCopySource) error

func (*StorageItem) Serialization added in v1.8.1

func (this *StorageItem) Serialization(sink *common.ZeroCopySink)

func (*StorageItem) ToArray

func (storageItem *StorageItem) ToArray() []byte

type StorageKey

type StorageKey struct {
	ContractAddress common.Address
	Key             []byte
}

func (*StorageKey) Deserialization added in v1.8.1

func (this *StorageKey) Deserialization(source *common.ZeroCopySource) error

func (*StorageKey) Serialization added in v1.8.1

func (this *StorageKey) Serialization(sink *common.ZeroCopySink)

func (*StorageKey) ToArray

func (this *StorageKey) ToArray() []byte

type ValidatorState

type ValidatorState struct {
	StateBase
	PublicKey keypair.PublicKey
}

func (*ValidatorState) Deserialization added in v1.8.1

func (this *ValidatorState) Deserialization(source *common.ZeroCopySource) error

func (*ValidatorState) Serialization added in v1.8.1

func (this *ValidatorState) Serialization(sink *common.ZeroCopySink)

type VoteState

type VoteState struct {
	StateBase
	PublicKeys []keypair.PublicKey
	Count      common.Fixed64
}

func (*VoteState) Deserialization added in v1.8.1

func (this *VoteState) Deserialization(source *common.ZeroCopySource) error

func (*VoteState) Serialization added in v1.8.1

func (this *VoteState) Serialization(sink *common.ZeroCopySink)

Jump to

Keyboard shortcuts

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