atlas

package
v0.0.0-...-b6c1db7 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

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

func GetModifiedAccountsCeloDollar(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool

GetModifiedAccountsCeloDollar returns an atlas of all of the modified accounts for the Celo Dollar Proxy contract between a fromBlock and a toBlock

func GetModifiedAccountsCeloGold

func GetModifiedAccountsCeloGold(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool

GetModifiedAccountsCeloGold returns an atlas of all of the modified accounts for the Celo Gold Proxy contract between a fromBlock and a toBlock

func GetModifiedAccountsElection

func GetModifiedAccountsElection(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool

GetModifiedAccountsElection returns an atlas of all of the modified accounts for the Election contract between a fromBlock and a toBlock

func GetModifiedAccountsLockedGold

func GetModifiedAccountsLockedGold(fromBlock *big.Int, toBlock *big.Int) map[common.Address]bool

GetModifiedAccountsLockedGold returns an atlas of all of the modified accounts for the LockedGold 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

type EpochRewardEvent struct {
	Group common.Address
	Value *big.Int
}

EpochRewardEvent is a struct to represent data for the event EpochRewardsDistributedToVoters(address,uint256)"

type ProposalApprovedEvent

type ProposalApprovedEvent struct {
	ProposalId  common.Hash
	BlockNumber *big.Int
}

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.

Jump to

Keyboard shortcuts

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