Documentation
¶
Index ¶
- func AddAtlasToRewardInfo(ri *RewardInfo)
- func GetExecutionStatusOfProposal(proposal *ProposalQueuedEvent, uptoBlockNumber *big.Int) bool
- func GetModifiedAccountsCeloDollar(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool
- func GetModifiedAccountsCeloGold(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool
- func GetModifiedAccountsElection(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool
- func GetModifiedAccountsLockedGold(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool
- type EpochPaymentEvent
- type EpochRewardEvent
- type ProposalApprovedEvent
- type ProposalQueuedEvent
- type RewardInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAtlasToRewardInfo ¶
func AddAtlasToRewardInfo(ri *RewardInfo)
AddAtlasToRewardInfo : For a validator group, a reward and the block height at which the block was received, compute a list of all addresses that have (ever) activated a reward for the group upto this block height and hence are potential recipients of a share of these rewards. This will return a superset of the list of addresses that are actual recipients of the reward shares. (depending on whether their vote for the group was active in this epoch cycle ) Relevant event
event ValidatorGroupVoteActivated( address indexed account, address indexed group, uint256 value, uint256 units
func GetExecutionStatusOfProposal ¶
func GetExecutionStatusOfProposal(proposal *ProposalQueuedEvent, uptoBlockNumber *big.Int) bool
GetExecutionStatusOfProposal checks if a proposal has been executed upto a block number
func GetModifiedAccountsCeloDollar ¶
GetModifiedAccountsCeloDollar returns an atlas of all of the modified accounts for the Celo Dollar Proxy contract between a fromBlock and a toBlock
func GetModifiedAccountsCeloGold ¶
GetModifiedAccountsCeloGold returns an atlas of all of the modified accounts for the Celo Gold Proxy contract between a fromBlock and a toBlock
func GetModifiedAccountsElection ¶
GetModifiedAccountsElection returns an atlas of all of the modified accounts for the Election contract between a fromBlock and a toBlock
Types ¶
type EpochPaymentEvent ¶
type EpochPaymentEvent struct { Validator common.Address ValidatorPayment *big.Int Group common.Address GroupPayment *big.Int BlockNumber *big.Int }
EpochPaymentEvent is a struct to represent data for the event ValidatorEpochPaymentDistributed(address,unit256,address,uint256) emitted by Validators.sol
func GetEpochPaymentEvents ¶
func GetEpochPaymentEvents(fromBlock *big.Int, toBlock *big.Int) []*EpochPaymentEvent
GetEpochPaymentEvents fetches data for all ValidatorEpochPaymentDistributed events emitted by the Validators contract between (and including) the two specified block numbers.
type EpochRewardEvent ¶
EpochRewardEvent is a struct to represent data for the event EpochRewardsDistributedToVoters(address,uint256)"
type ProposalApprovedEvent ¶
ProposalApprovedEvent corresponds to event ProposalApproved(uint256 indexed proposalId); */
func GetProposalApprovedEvents ¶
func GetProposalApprovedEvents(fromBlock *big.Int, toBlock *big.Int) []*ProposalApprovedEvent
GetProposalApprovedEvents fetches data for all Proposal Approved events between (and including) the two specified block numbers
type ProposalQueuedEvent ¶
type ProposalQueuedEvent struct { ProposalId common.Hash Proposer common.Address TransactionCount *big.Int Deposit *big.Int Timestamp *big.Int BlockNumber *big.Int }
ProposalQueuedEvent corresponds to event
event ProposalQueued( uint256 indexed proposalId, address indexed proposer, uint256 transactionCount, uint256 deposit, uint256 timestamp );
func GetProposalQueuedEvents ¶
func GetProposalQueuedEvents(fromBlock *big.Int, toBlock *big.Int) []*ProposalQueuedEvent
GetProposalQueuedEvents fetches data of all Proposal Queued events between (and including) the two specified block numbers
type RewardInfo ¶
type RewardInfo struct { Group string GroupHash common.Hash RewardValue *big.Int BlockNumber *big.Int AddressAtlas map[common.Address]bool }
RewardInfo stores information representing data for the event EpochRewardsDistributedToVoters(address,uint256) plus a superset list of addresses that are potential recipient of shares of this reward
func GetRewardEventsInfo ¶
func GetRewardEventsInfo(fromBlock *big.Int, toBlock *big.Int) []*RewardInfo
GetRewardEventsInfo returns list of all validator groups (with corresponding reward value and block number at which the reward was received) that received epoch rewards between (and including) the two specified block numbers.