Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( StatesMap = map[store.DataEntryPrefix]IStateValueInterface{ store.ST_Contract: new(ContractState), store.ST_Storage: new(StorageItem), store.ST_ACCOUNT: new(AccountState), store.ST_AssetState: new(AssetState), store.ST_Validator: new(ValidatorState), } )
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 (*AccountState) Deserialize ¶
func (accountState *AccountState) Deserialize(r io.Reader) 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) 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) ToArray ¶
func (contractState *ContractState) ToArray() []byte
type IStateKeyInterface ¶
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 StorageItem ¶
func NewStorageItem ¶
func NewStorageItem(value []byte) *StorageItem
func (*StorageItem) Deserialize ¶
func (storageItem *StorageItem) Deserialize(r io.Reader) error
func (*StorageItem) ToArray ¶
func (storageItem *StorageItem) ToArray() []byte
type StorageKey ¶
func NewStorageKey ¶
func NewStorageKey(codehash *common.Uint160, key []byte) *StorageKey
func (*StorageKey) Deserialize ¶
func (storageKey *StorageKey) Deserialize(r io.Reader) error
type ValidatorState ¶
func (*ValidatorState) Deserialize ¶
func (v *ValidatorState) Deserialize(r io.Reader) error
func (*ValidatorState) ToArray ¶
func (v *ValidatorState) ToArray() []byte
Click to show internal directories.
Click to hide internal directories.