states

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AccountState

type AccountState struct {
	StateBase
	ProgramHash common.Uint160
	IsFrozen    bool
	Balances    map[common.Uint256]common.Fixed64
}

func NewAccountState

func NewAccountState(hash common.Uint160, balance map[common.Uint256]common.Fixed64) *AccountState

func (*AccountState) Deserialize

func (accountState *AccountState) Deserialize(r io.Reader) error

func (*AccountState) Serialize

func (accountState *AccountState) Serialize(w io.Writer) error

func (*AccountState) ToArray

func (accountState *AccountState) ToArray() []byte

type AssetState

type AssetState struct {
	StateBase
	AssetId    common.Uint256
	AssetType  asset.AssetType
	Name       string
	Amount     common.Fixed64
	Available  common.Fixed64
	Precision  byte
	FeeMode    byte
	Fee        common.Fixed64
	FeeAddress *common.Uint160
	Owner      *crypto.PubKey
	Admin      common.Uint160
	Issuer     common.Uint160
	Expiration uint32
	IsFrozen   bool
}

func (*AssetState) Deserialize

func (assetState *AssetState) Deserialize(r io.Reader) error

func (*AssetState) Serialize

func (assetState *AssetState) Serialize(w io.Writer) error

func (*AssetState) ToArray

func (assetState *AssetState) ToArray() []byte

type ContractState

type ContractState struct {
	StateBase
	Code        *code.FunctionCode
	Name        string
	Version     string
	Author      string
	Email       string
	Description string
	Language    types.LangType
	ProgramHash common.Uint160
}

func (*ContractState) Deserialize

func (contractState *ContractState) Deserialize(r io.Reader) error

func (*ContractState) Serialize

func (contractState *ContractState) Serialize(w io.Writer) error

func (*ContractState) ToArray

func (contractState *ContractState) ToArray() []byte

type IStateKeyInterface

type IStateKeyInterface interface {
	Serialize(w io.Writer) (int, error)
	Deserialize(r io.Reader) error
}

type IStateValueInterface

type IStateValueInterface interface {
	Serialize(w io.Writer) error
	Deserialize(r io.Reader) error
	interfaces.IInteropInterface
}

func GetStateValue

func GetStateValue(prefix store.DataEntryPrefix, data []byte) (IStateValueInterface, error)

type StateBase

type StateBase struct {
	StateVersion byte
}

func (*StateBase) Deserialize

func (stateBase *StateBase) Deserialize(r io.Reader) error

func (*StateBase) Serialize

func (stateBase *StateBase) Serialize(w io.Writer) error

type StorageItem

type StorageItem struct {
	StateBase
	Value []byte
}

func NewStorageItem

func NewStorageItem(value []byte) *StorageItem

func (*StorageItem) Deserialize

func (storageItem *StorageItem) Deserialize(r io.Reader) error

func (*StorageItem) Serialize

func (storageItem *StorageItem) Serialize(w io.Writer) error

func (*StorageItem) ToArray

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

type StorageKey

type StorageKey struct {
	CodeHash common.Uint160
	Key      []byte
}

func NewStorageKey

func NewStorageKey(codehash *common.Uint160, key []byte) *StorageKey

func (*StorageKey) Deserialize

func (storageKey *StorageKey) Deserialize(r io.Reader) error

func (*StorageKey) Serialize

func (storageKey *StorageKey) Serialize(w io.Writer) (int, error)

type ValidatorState

type ValidatorState struct {
	StateBase
	PublicKey *crypto.PubKey
}

func (*ValidatorState) Deserialize

func (v *ValidatorState) Deserialize(r io.Reader) error

func (*ValidatorState) Serialize

func (v *ValidatorState) Serialize(w io.Writer) error

func (*ValidatorState) ToArray

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

Jump to

Keyboard shortcuts

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