datacap

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0, MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AllCodes

func AllCodes() []cid.Cid

func NewBalanceDiffContainer

func NewBalanceDiffContainer(pre, cur State) *balanceDiffContainer

func VersionCodes

func VersionCodes() map[actorstypes.Version]cid.Cid

Types

type BalanceChange

type BalanceChange struct {
	Before BalanceInfo
	After  BalanceInfo
}

type BalanceChanges

type BalanceChanges struct {
	Added    []BalanceInfo
	Modified []BalanceChange
	Removed  []BalanceInfo
}

func DiffDataCapBalances

func DiffDataCapBalances(ctx context.Context, store adt.Store, pre, cur State) (*BalanceChanges, error)

type BalanceInfo

type BalanceInfo struct {
	Address address.Address
	DataCap abi.StoragePower
}

type State

type State interface {
	cbor.Marshaler

	Code() cid.Cid
	ActorKey() string
	ActorVersion() actorstypes.Version

	ForEachClient(func(addr address.Address, dcap abi.StoragePower) error) error
	VerifiedClientDataCap(address.Address) (bool, abi.StoragePower, error)
	Governor() (address.Address, error)
	GetState() interface{}

	VerifiedClients() (adt.Map, error)
	VerifiedClientsMapBitWidth() int
	VerifiedClientsMapHashFunction() func(input []byte) []byte
}

func Load

func Load(store adt.Store, act *types.Actor) (State, error)

func MakeState

func MakeState(store adt.Store, av actorstypes.Version, governor address.Address, bitwidth uint64) (State, error)

Jump to

Keyboard shortcuts

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