Documentation
¶
Index ¶
- Constants
- func NewAgentContract(cli iotex.AuthedClient, addr address.Address) (*agentContract, error)
- func NewBrokerContract(cli iotex.AuthedClient, addr address.Address, batchSize uint8) (*brokerContract, error)
- func NewClerkContract(cli iotex.AuthedClient, addr address.Address) (*clerkContract, error)
- func NewIoTeXClient(client iotexapi.APIServiceClient) *iotexClient
- func NewRotatableWeightedVPS(cli iotex.AuthedClient, addr address.Address, batchSize uint8) (*rwvps, error)
- func NewVitaContract(cli iotex.AuthedClient, addr address.Address) (*vitaContract, error)
- type Config
- type VoteFetcher
- type VoteSync
- type VotingPowers
- type WeightedVote
Constants ¶
View Source
const (
// PollProtocolID is ID of poll protocol
PollProtocolID = "poll"
)
Variables ¶
This section is empty.
Functions ¶
func NewAgentContract ¶ added in v0.3.5
func NewAgentContract(cli iotex.AuthedClient, addr address.Address) (*agentContract, error)
func NewBrokerContract ¶ added in v0.3.5
func NewClerkContract ¶ added in v0.3.5
func NewClerkContract(cli iotex.AuthedClient, addr address.Address) (*clerkContract, error)
func NewIoTeXClient ¶ added in v0.3.5
func NewIoTeXClient(client iotexapi.APIServiceClient) *iotexClient
func NewRotatableWeightedVPS ¶ added in v0.3.5
func NewVitaContract ¶ added in v0.3.5
func NewVitaContract(cli iotex.AuthedClient, addr address.Address) (*vitaContract, error)
Types ¶
type Config ¶
type Config struct { GravityChainAPIs []string `yaml:"gravityChainAPIs"` GravityChainTimeInterval time.Duration `yaml:"gravityChainTimeInterval"` OperatorPrivateKey string `yaml:"operatorPrivateKey"` IoTeXAPI string `yaml:"ioTeXAPI"` IoTeXAPISecure bool `yaml:"ioTeXAPISecure"` RegisterContractAddress string `yaml:"registerContractAddress"` StakingContractAddress string `yaml:"stakingContractAddress"` PaginationSize uint8 `yaml:"paginationSize"` BrokerPaginationSize uint8 `yaml:"brokerPaginationSize"` VitaContractAddress string `yaml:"vitaContractAddress"` DiscordBotToken string `yaml:"discordBotToken"` DiscordChannelID string `yaml:"discordChannelID"` DiscordMsg string `yaml:"discordMsg"` DiscordReminder string `yaml:"discordReminder"` DardanellesHeight uint64 `yaml:"dardanellesHeight"` FairBankHeight uint64 `yaml:"fairbankHeight"` NativeCommitteeInitHeight uint64 `yaml:"nativeCommitteeInitHeight"` EnableAgentMode bool `yaml:"enableAgentMode"` AgentContractAddress string `yaml:"agentContractAddress"` }
Config defines the configs for VoteSync
type VoteFetcher ¶ added in v0.3.5
type VoteFetcher struct {
// contains filtered or unexported fields
}
VoteFetcher defines fields used to fetch votes
func (*VoteFetcher) FetchBucketsByHeight ¶ added in v0.3.5
func (fetcher *VoteFetcher) FetchBucketsByHeight(ctx context.Context, h uint64) (*iotextypes.VoteBucketList, *iotextypes.CandidateListV2, error)
type VoteSync ¶
type VoteSync struct {
// contains filtered or unexported fields
}
VoteSync defines fields used in VoteSync
func NewVoteSync ¶
NewVoteSync instantiates new VoteSync
func (*VoteSync) ProofForAccount ¶ added in v0.3.5
type VotingPowers ¶ added in v0.3.5
type VotingPowers struct {
// contains filtered or unexported fields
}
func (*VotingPowers) Total ¶ added in v0.3.5
func (vp *VotingPowers) Total() *big.Int
func (*VotingPowers) VotingPower ¶ added in v0.3.5
type WeightedVote ¶
WeightedVote defines voter and votes for weighted vote
Click to show internal directories.
Click to hide internal directories.