vote

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0, MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type State

type State interface {
	cbor.Marshaler

	Tally() (*Tally, error)
	VoterInfo(addr address.Address, currEpoch abi.ChainEpoch, currBalance abi.TokenAmount) (*VoterInfo, error)
}

func Load

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

type Tally

type Tally struct {
	TotalVotes       abi.TokenAmount
	UnownedFunds     abi.TokenAmount
	FallbackReceiver address.Address
	Candidates       map[string]abi.TokenAmount // key is candidate address
	Blocked          map[string]bool
}

type VoterInfo

type VoterInfo struct {
	UnlockingVotes      abi.TokenAmount
	UnlockedVotes       abi.TokenAmount
	WithdrawableRewards abi.TokenAmount
	Candidates          map[string]abi.TokenAmount // key is candidate address
}

Jump to

Keyboard shortcuts

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