address

package
v0.0.0-...-5d05a64 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddressStateKey

func GetAddressStateKey(address []byte) []byte

Types

type AddressState

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

func GetAddressState

func GetAddressState(db *db.DB, address []byte, lastBlockHeaderHash common.Hash,
	finalizedHeaderHash common.Hash) (*AddressState, error)

func NewAddressState

func NewAddressState(address []byte, nonce uint64, balance uint64) *AddressState

func (*AddressState) AddBalance

func (a *AddressState) AddBalance(balance uint64)

func (*AddressState) Address

func (a *AddressState) Address() []byte

func (*AddressState) Balance

func (a *AddressState) Balance() uint64

func (*AddressState) Commit

func (a *AddressState) Commit(b *bbolt.Bucket) error

func (*AddressState) DeSerialize

func (a *AddressState) DeSerialize(data []byte) error

func (*AddressState) DecreaseNonce

func (a *AddressState) DecreaseNonce()

func (*AddressState) Height

func (a *AddressState) Height() uint64

func (*AddressState) IncreaseNonce

func (a *AddressState) IncreaseNonce()

func (*AddressState) LockStakeBalance

func (a *AddressState) LockStakeBalance(balance uint64)

func (*AddressState) Nonce

func (a *AddressState) Nonce() uint64

func (*AddressState) PBData

func (a *AddressState) PBData() *protos.AddressState

func (*AddressState) ReleaseStakeBalance

func (a *AddressState) ReleaseStakeBalance(balance uint64)

func (*AddressState) Serialize

func (a *AddressState) Serialize() ([]byte, error)

func (*AddressState) SetBalance

func (a *AddressState) SetBalance(balance uint64)

func (*AddressState) StakeBalance

func (a *AddressState) StakeBalance() uint64

func (*AddressState) SubtractBalance

func (a *AddressState) SubtractBalance(balance uint64)

Jump to

Keyboard shortcuts

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