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
type CandidateListStateContext ¶
type CandidateListStateContext struct {
*protocol.BaseStateContext
}
func (*CandidateListStateContext) EncodeToEth ¶
func (r *CandidateListStateContext) EncodeToEth(resp *iotexapi.ReadStateResponse) (string, error)
EncodeToEth encode proto to eth
type ProbationInfo ¶
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 ¶
func (r *ProbationListStateContext) EncodeToEth(resp *iotexapi.ReadStateResponse) (string, error)
EncodeToEth encode proto to eth
Click to show internal directories.
Click to hide internal directories.