ethabi

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReadStateRequest

func BuildReadStateRequest(data []byte) (protocol.StateContext, error)

Types

type Candidate

type Candidate struct {
	ID              common.Address `abi:"id"`
	Name            string         `abi:"name"`
	OperatorAddress common.Address `abi:"operatorAddress"`
	RewardAddress   common.Address `abi:"rewardAddress"`
	BlsPubKey       []byte         `abi:"blsPubKey"`
	Votes           *big.Int       `abi:"votes"`
}

Candidate represents a candidate in the Ethereum ABI format

func ConvertCandidateListFromState

func ConvertCandidateListFromState(stateCandidates state.CandidateList) ([]Candidate, error)

ConvertCandidateListFromState converts a state.CandidateList to []Candidate

func NewCandidateFromState

func NewCandidateFromState(stateCandidate *state.Candidate) (*Candidate, error)

NewCandidateFromState converts a state.Candidate to ethabi.Candidate

type CandidateListStateContext

type CandidateListStateContext struct {
	*protocol.BaseStateContext
}

func (*CandidateListStateContext) EncodeToEth

EncodeToEth encode proto to eth

type ProbationInfo

type ProbationInfo struct {
	Candidate       common.Address
	OperatorAddress common.Address
	Count           uint32
}

ProbationInfo represents a probation info in the Ethereum ABI format

func NewProbationInfoFromState

func NewProbationInfoFromState(addrStr string, count uint32) (*ProbationInfo, error)

NewProbationInfoFromState converts a single probation entry to ethabi.ProbationInfo

type ProbationList

type ProbationList struct {
	ProbationInfo []ProbationInfo
	IntensityRate uint32
}

ProbationList represents a probation list in the Ethereum ABI format

func ConvertProbationListFromState

func ConvertProbationListFromState(stateProbationList *vote.ProbationList) (*ProbationList, error)

ConvertProbationListFromState converts a vote.ProbationList to ethabi.ProbationList

type ProbationListStateContext

type ProbationListStateContext struct {
	*protocol.BaseStateContext
}

func (*ProbationListStateContext) EncodeToEth

EncodeToEth encode proto to eth

Jump to

Keyboard shortcuts

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