Documentation ¶
Index ¶
- Constants
- func NewLayerZeroListQ(db *pgdb.DB) data.LayerZeroListStorage
- func NewSystemContractsStorage(db *pgdb.DB) data.SystemContractsStorage
- func UnionAll(mainQuery *squirrel.SelectBuilder, query squirrel.SelectBuilder) error
- type AllVotings
- type BlockStorage
- func (s *BlockStorage) Erase(fromID uint64) error
- func (s *BlockStorage) GetBlockEarlierThan(timestamp int64) (*data.Block, error)
- func (s *BlockStorage) GetByNumber(number uint64) (*data.Block, error)
- func (s *BlockStorage) GetLatest() (*data.Block, error)
- func (s *BlockStorage) Insert(block *data.Block) error
- func (s *BlockStorage) Select(params *data.SelectBlocksParams) ([]data.Block, error)
- type ConstitutionVotingStorage
- func (s *ConstitutionVotingStorage) GetEarliestUnfinishedVotings() ([]data.ConstitutionVoting, error)
- func (s *ConstitutionVotingStorage) GetLatest() (*data.ConstitutionVoting, error)
- func (s *ConstitutionVotingStorage) Insert(votings ...data.ConstitutionVoting) error
- func (s *ConstitutionVotingStorage) Update(voting *data.ConstitutionVoting) error
- type ContractRegistryAddressVotingStorage
- func (s *ContractRegistryAddressVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryAddressVoting, error)
- func (s *ContractRegistryAddressVotingStorage) GetLatest() (*data.ContractRegistryAddressVoting, error)
- func (s *ContractRegistryAddressVotingStorage) Insert(votings ...data.ContractRegistryAddressVoting) error
- func (s *ContractRegistryAddressVotingStorage) Update(voting *data.ContractRegistryAddressVoting) error
- type ContractRegistryUpgradeVotingStorage
- func (s *ContractRegistryUpgradeVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryUpgradeVoting, error)
- func (s *ContractRegistryUpgradeVotingStorage) GetLatest() (*data.ContractRegistryUpgradeVoting, error)
- func (s *ContractRegistryUpgradeVotingStorage) Insert(votings ...data.ContractRegistryUpgradeVoting) error
- func (s *ContractRegistryUpgradeVotingStorage) Update(voting *data.ContractRegistryUpgradeVoting) error
- type EmergencyUpdateVotingStorage
- func (s *EmergencyUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.EmergencyUpdateVoting, error)
- func (s *EmergencyUpdateVotingStorage) GetLatest() (*data.EmergencyUpdateVoting, error)
- func (s *EmergencyUpdateVotingStorage) Insert(votings ...data.EmergencyUpdateVoting) error
- func (s *EmergencyUpdateVotingStorage) Update(voting *data.EmergencyUpdateVoting) error
- type EpdrMembershipVotingStorage
- func (s *EpdrMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrMembershipVoting, error)
- func (s *EpdrMembershipVotingStorage) GetLatest() (*data.EpdrMembershipVoting, error)
- func (s *EpdrMembershipVotingStorage) Insert(votings ...data.EpdrMembershipVoting) error
- func (s *EpdrMembershipVotingStorage) Update(voting *data.EpdrMembershipVoting) error
- type EpdrParametersVotingStorage
- func (s *EpdrParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrParametersVoting, error)
- func (s *EpdrParametersVotingStorage) GetLatest() (*data.EpdrParametersVoting, error)
- func (s *EpdrParametersVotingStorage) Insert(votings ...data.EpdrParametersVoting) error
- func (s *EpdrParametersVotingStorage) Update(voting *data.EpdrParametersVoting) error
- type EpqfiMembershipVotingStorage
- func (s *EpqfiMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiMembershipVoting, error)
- func (s *EpqfiMembershipVotingStorage) GetLatest() (*data.EpqfiMembershipVoting, error)
- func (s *EpqfiMembershipVotingStorage) Insert(votings ...data.EpqfiMembershipVoting) error
- func (s *EpqfiMembershipVotingStorage) Update(voting *data.EpqfiMembershipVoting) error
- type EpqfiParametersVotingStorage
- func (s *EpqfiParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiParametersVoting, error)
- func (s *EpqfiParametersVotingStorage) GetLatest() (*data.EpqfiParametersVoting, error)
- func (s *EpqfiParametersVotingStorage) Insert(votings ...data.EpqfiParametersVoting) error
- func (s *EpqfiParametersVotingStorage) Update(voting *data.EpqfiParametersVoting) error
- type EprsMembershipVotingStorage
- func (s *EprsMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsMembershipVoting, error)
- func (s *EprsMembershipVotingStorage) GetLatest() (*data.EprsMembershipVoting, error)
- func (s *EprsMembershipVotingStorage) Insert(votings ...data.EprsMembershipVoting) error
- func (s *EprsMembershipVotingStorage) Update(voting *data.EprsMembershipVoting) error
- type EprsParametersVotingStorage
- func (s *EprsParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsParametersVoting, error)
- func (s *EprsParametersVotingStorage) GetLatest() (*data.EprsParametersVoting, error)
- func (s *EprsParametersVotingStorage) Insert(votings ...data.EprsParametersVoting) error
- func (s *EprsParametersVotingStorage) Update(voting *data.EprsParametersVoting) error
- type GeneralUpdateVotingStorage
- func (s *GeneralUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.GeneralUpdateVoting, error)
- func (s *GeneralUpdateVotingStorage) GetLatest() (*data.GeneralUpdateVoting, error)
- func (s *GeneralUpdateVotingStorage) Insert(votings ...data.GeneralUpdateVoting) error
- func (s *GeneralUpdateVotingStorage) Update(voting *data.GeneralUpdateVoting) error
- type PaymentStorage
- type QTokenHolderVotesStorage
- type RootNodeApprovalsStorage
- func (s *RootNodeApprovalsStorage) GetLatest() (approval *data.RootNodeApproval, err error)
- func (s *RootNodeApprovalsStorage) Insert(approvals ...data.RootNodeApproval) error
- func (s *RootNodeApprovalsStorage) Select(params data.SelectRootNodeApprovalParams, highestBlock uint64) (data.RootNodeBreakdown, error)
- type RootNodeProposalsStorage
- type RootNodeVotesStorage
- type RootnodesSlashingVotingStorage
- func (s *RootnodesSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.RootnodesSlashingVoting, error)
- func (s *RootnodesSlashingVotingStorage) GetLatest() (*data.RootnodesSlashingVoting, error)
- func (s *RootnodesSlashingVotingStorage) Insert(votings ...data.RootnodesSlashingVoting) error
- func (s *RootnodesSlashingVotingStorage) Update(voting *data.RootnodesSlashingVoting) error
- type RootsMembershipStorage
- func (s *RootsMembershipStorage) Erase(fromID uint64) error
- func (s *RootsMembershipStorage) FindNextPeriodByAddress(rootAddress string, startBlock int64) (*data.RootsMembership, error)
- func (s *RootsMembershipStorage) GetLatest() (*data.RootsMembership, error)
- func (s *RootsMembershipStorage) GetUnfinishedPeriodByAddress(rootAddress string) (*data.RootsMembership, error)
- func (s *RootsMembershipStorage) GetUnfinishedPeriods() ([]data.RootsMembership, error)
- func (s *RootsMembershipStorage) Insert(rnMembership *data.RootsMembership) error
- func (s *RootsMembershipStorage) Select(params *data.SelectRootsMembershipParams) ([]data.RootsMembership, error)
- func (s *RootsMembershipStorage) SelectActiveRootAddresses() ([]string, error)
- func (s *RootsMembershipStorage) Update(rnMembership *data.RootsMembership) error
- type RootsVotingStorage
- type Storage
- func (s *Storage) Blocks() data.BlockStorage
- func (s *Storage) Clone() data.Storage
- func (s *Storage) ConstitutionVotings() data.ConstitutionVotingStorage
- func (s *Storage) ContractRegistryAddressVotings() data.ContractRegistryAddressVotingStorage
- func (s *Storage) ContractRegistryUpgradeVotings() data.ContractRegistryUpgradeVotingStorage
- func (s *Storage) EmergencyUpdateVotings() data.EmergencyUpdateVotingStorage
- func (s *Storage) EpdrMembershipVotings() data.EpdrMembershipVotingStorage
- func (s *Storage) EpdrParametersVotings() data.EpdrParametersVotingStorage
- func (s *Storage) EpqfiMembershipVotings() data.EpqfiMembershipVotingStorage
- func (s *Storage) EpqfiParametersVotings() data.EpqfiParametersVotingStorage
- func (s *Storage) EprsMembershipVotings() data.EprsMembershipVotingStorage
- func (s *Storage) EprsParametersVotings() data.EprsParametersVotingStorage
- func (s *Storage) ExecInTx(fn func() error) error
- func (s *Storage) GeneralUpdateVotings() data.GeneralUpdateVotingStorage
- func (s *Storage) LayerZeroLists() data.LayerZeroListStorage
- func (s *Storage) Payments() data.PaymentsStorage
- func (s *Storage) QTokenHolderVotes() data.QTokenHolderVotesStorage
- func (s *Storage) RootNodeApprovals() data.RootNodeApprovalsStorage
- func (s *Storage) RootNodeProposals() data.RootNodeProposalsStorage
- func (s *Storage) RootNodeVotes() data.RootNodeVotesStorage
- func (s *Storage) RootnodesSlashingVotings() data.RootnodesSlashingVotingStorage
- func (s *Storage) RootsMembership() data.RootsMembershipStorage
- func (s *Storage) RootsVotings() data.RootsVotingStorage
- func (s *Storage) SummaryMetrics() data.SummaryMetricsStorage
- func (s *Storage) SystemContracts() data.SystemContractsStorage
- func (s *Storage) Transactions() data.TransactionStorage
- func (s *Storage) ValidatorsSlashingVotings() data.ValidatorsSlashingVotingStorage
- func (s *Storage) Variables() data.VariableStorage
- func (s *Storage) VotingAgents() data.VotingAgentStorage
- func (s *Storage) Votings() data.VotingStorage
- type SummaryMetricsStorage
- type TransactionStorage
- type ValidatorsSlashingVotingStorage
- func (s *ValidatorsSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.ValidatorsSlashingVoting, error)
- func (s *ValidatorsSlashingVotingStorage) GetLatest() (*data.ValidatorsSlashingVoting, error)
- func (s *ValidatorsSlashingVotingStorage) Insert(votings ...data.ValidatorsSlashingVoting) error
- func (s *ValidatorsSlashingVotingStorage) Update(voting *data.ValidatorsSlashingVoting) error
- type VariableStorage
- type VotingAgentStorage
- type VotingEventsStorage
- func (s *VotingEventsStorage) Erase(fromID uint64) error
- func (s *VotingEventsStorage) GetByLatestByType(votingType string) (*data.VotingEvent, error)
- func (s *VotingEventsStorage) Insert(votingEvents ...data.VotingEvent) error
- func (s *VotingEventsStorage) Select(params data.SelectVotingEventsParams, addresses []string) ([]data.VotingEvent, error)
- type VotingStorage
Constants ¶
const EpochLength = 101
Variables ¶
This section is empty.
Functions ¶
func NewLayerZeroListQ ¶ added in v1.0.0
func NewLayerZeroListQ(db *pgdb.DB) data.LayerZeroListStorage
func NewSystemContractsStorage ¶ added in v1.0.0
func NewSystemContractsStorage(db *pgdb.DB) data.SystemContractsStorage
func UnionAll ¶ added in v1.0.0
func UnionAll(mainQuery *squirrel.SelectBuilder, query squirrel.SelectBuilder) error
Types ¶
type AllVotings ¶
type AllVotings struct { Cvotings []data.ConstitutionVoting GUvotings []data.GeneralUpdateVoting EUvotings []data.EmergencyUpdateVoting Rvotings []data.RootsVoting RSvotings []data.RootnodesSlashingVoting VSvotings []data.ValidatorsSlashingVoting EPQFIMvotings []data.EpqfiMembershipVoting EPQFIPvotings []data.EpqfiParametersVoting EPDRMvotings []data.EpdrMembershipVoting EPDRPvotings []data.EpdrParametersVoting EPRSMvotings []data.EprsMembershipVoting EPRSPvotings []data.EprsParametersVoting CRAvotings []data.ContractRegistryAddressVoting CRUvotings []data.ContractRegistryUpgradeVoting }
type BlockStorage ¶
type BlockStorage struct {
// contains filtered or unexported fields
}
BlockStorage implements data.BlockStorage.
func (*BlockStorage) Erase ¶
func (s *BlockStorage) Erase(fromID uint64) error
Erase all history starting fromID inclusively.
func (*BlockStorage) GetBlockEarlierThan ¶
func (s *BlockStorage) GetBlockEarlierThan(timestamp int64) (*data.Block, error)
func (*BlockStorage) GetByNumber ¶
func (s *BlockStorage) GetByNumber(number uint64) (*data.Block, error)
func (*BlockStorage) GetLatest ¶
func (s *BlockStorage) GetLatest() (*data.Block, error)
GetLatest block.
func (*BlockStorage) Select ¶
func (s *BlockStorage) Select(params *data.SelectBlocksParams) ([]data.Block, error)
Select blocks with params.
type ConstitutionVotingStorage ¶
type ConstitutionVotingStorage struct {
// contains filtered or unexported fields
}
ConstitutionVotingStorage implements data.ConstitutionVotingStorage.
func (*ConstitutionVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *ConstitutionVotingStorage) GetEarliestUnfinishedVotings() ([]data.ConstitutionVoting, error)
func (*ConstitutionVotingStorage) GetLatest ¶
func (s *ConstitutionVotingStorage) GetLatest() (*data.ConstitutionVoting, error)
GetLatest block.
func (*ConstitutionVotingStorage) Insert ¶
func (s *ConstitutionVotingStorage) Insert(votings ...data.ConstitutionVoting) error
func (*ConstitutionVotingStorage) Update ¶
func (s *ConstitutionVotingStorage) Update(voting *data.ConstitutionVoting) error
type ContractRegistryAddressVotingStorage ¶
type ContractRegistryAddressVotingStorage struct {
// contains filtered or unexported fields
}
ContractRegistryAddressVotingStorage implements data.ContractRegistryAddressVotingStorage.
func (*ContractRegistryAddressVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *ContractRegistryAddressVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryAddressVoting, error)
func (*ContractRegistryAddressVotingStorage) GetLatest ¶
func (s *ContractRegistryAddressVotingStorage) GetLatest() (*data.ContractRegistryAddressVoting, error)
GetLatest block.
func (*ContractRegistryAddressVotingStorage) Insert ¶
func (s *ContractRegistryAddressVotingStorage) Insert(votings ...data.ContractRegistryAddressVoting) error
func (*ContractRegistryAddressVotingStorage) Update ¶
func (s *ContractRegistryAddressVotingStorage) Update(voting *data.ContractRegistryAddressVoting) error
type ContractRegistryUpgradeVotingStorage ¶
type ContractRegistryUpgradeVotingStorage struct {
// contains filtered or unexported fields
}
ContractRegistryUpgradeVotingStorage implements data.ContractRegistryUpgradeVotingStorage.
func (*ContractRegistryUpgradeVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *ContractRegistryUpgradeVotingStorage) GetEarliestUnfinishedVotings() ([]data.ContractRegistryUpgradeVoting, error)
func (*ContractRegistryUpgradeVotingStorage) GetLatest ¶
func (s *ContractRegistryUpgradeVotingStorage) GetLatest() (*data.ContractRegistryUpgradeVoting, error)
GetLatest block.
func (*ContractRegistryUpgradeVotingStorage) Insert ¶
func (s *ContractRegistryUpgradeVotingStorage) Insert(votings ...data.ContractRegistryUpgradeVoting) error
func (*ContractRegistryUpgradeVotingStorage) Update ¶
func (s *ContractRegistryUpgradeVotingStorage) Update(voting *data.ContractRegistryUpgradeVoting) error
type EmergencyUpdateVotingStorage ¶
type EmergencyUpdateVotingStorage struct {
// contains filtered or unexported fields
}
EmergencyUpdateVotingStorage implements data.EmergencyUpdateVotingStorage.
func (*EmergencyUpdateVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EmergencyUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.EmergencyUpdateVoting, error)
func (*EmergencyUpdateVotingStorage) GetLatest ¶
func (s *EmergencyUpdateVotingStorage) GetLatest() (*data.EmergencyUpdateVoting, error)
GetLatest block.
func (*EmergencyUpdateVotingStorage) Insert ¶
func (s *EmergencyUpdateVotingStorage) Insert(votings ...data.EmergencyUpdateVoting) error
func (*EmergencyUpdateVotingStorage) Update ¶
func (s *EmergencyUpdateVotingStorage) Update(voting *data.EmergencyUpdateVoting) error
type EpdrMembershipVotingStorage ¶
type EpdrMembershipVotingStorage struct {
// contains filtered or unexported fields
}
EpdrMembershipVotingStorage implements data.EpdrMembershipVotingStorage.
func (*EpdrMembershipVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EpdrMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrMembershipVoting, error)
func (*EpdrMembershipVotingStorage) GetLatest ¶
func (s *EpdrMembershipVotingStorage) GetLatest() (*data.EpdrMembershipVoting, error)
GetLatest block.
func (*EpdrMembershipVotingStorage) Insert ¶
func (s *EpdrMembershipVotingStorage) Insert(votings ...data.EpdrMembershipVoting) error
func (*EpdrMembershipVotingStorage) Update ¶
func (s *EpdrMembershipVotingStorage) Update(voting *data.EpdrMembershipVoting) error
type EpdrParametersVotingStorage ¶
type EpdrParametersVotingStorage struct {
// contains filtered or unexported fields
}
EpdrParametersVotingStorage implements data.EpdrParametersVotingStorage.
func (*EpdrParametersVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EpdrParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpdrParametersVoting, error)
func (*EpdrParametersVotingStorage) GetLatest ¶
func (s *EpdrParametersVotingStorage) GetLatest() (*data.EpdrParametersVoting, error)
GetLatest epdr parameters voting.
func (*EpdrParametersVotingStorage) Insert ¶
func (s *EpdrParametersVotingStorage) Insert(votings ...data.EpdrParametersVoting) error
func (*EpdrParametersVotingStorage) Update ¶
func (s *EpdrParametersVotingStorage) Update(voting *data.EpdrParametersVoting) error
type EpqfiMembershipVotingStorage ¶
type EpqfiMembershipVotingStorage struct {
// contains filtered or unexported fields
}
EpqfiMembershipVotingStorage implements data.EpqfiMembershipVotingStorage.
func (*EpqfiMembershipVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EpqfiMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiMembershipVoting, error)
func (*EpqfiMembershipVotingStorage) GetLatest ¶
func (s *EpqfiMembershipVotingStorage) GetLatest() (*data.EpqfiMembershipVoting, error)
GetLatest epqfi membership voting.
func (*EpqfiMembershipVotingStorage) Insert ¶
func (s *EpqfiMembershipVotingStorage) Insert(votings ...data.EpqfiMembershipVoting) error
func (*EpqfiMembershipVotingStorage) Update ¶
func (s *EpqfiMembershipVotingStorage) Update(voting *data.EpqfiMembershipVoting) error
type EpqfiParametersVotingStorage ¶
type EpqfiParametersVotingStorage struct {
// contains filtered or unexported fields
}
EpqfiParametersVotingStorage implements data.EpqfiParametersVotingStorage.
func (*EpqfiParametersVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EpqfiParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EpqfiParametersVoting, error)
func (*EpqfiParametersVotingStorage) GetLatest ¶
func (s *EpqfiParametersVotingStorage) GetLatest() (*data.EpqfiParametersVoting, error)
GetLatest epqfi parameters voting.
func (*EpqfiParametersVotingStorage) Insert ¶
func (s *EpqfiParametersVotingStorage) Insert(votings ...data.EpqfiParametersVoting) error
func (*EpqfiParametersVotingStorage) Update ¶
func (s *EpqfiParametersVotingStorage) Update(voting *data.EpqfiParametersVoting) error
type EprsMembershipVotingStorage ¶
type EprsMembershipVotingStorage struct {
// contains filtered or unexported fields
}
EprsMembershipVotingStorage implements data.EprsMembershipVotingStorage.
func (*EprsMembershipVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EprsMembershipVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsMembershipVoting, error)
func (*EprsMembershipVotingStorage) GetLatest ¶
func (s *EprsMembershipVotingStorage) GetLatest() (*data.EprsMembershipVoting, error)
GetLatest eprs membership voting.
func (*EprsMembershipVotingStorage) Insert ¶
func (s *EprsMembershipVotingStorage) Insert(votings ...data.EprsMembershipVoting) error
func (*EprsMembershipVotingStorage) Update ¶
func (s *EprsMembershipVotingStorage) Update(voting *data.EprsMembershipVoting) error
type EprsParametersVotingStorage ¶
type EprsParametersVotingStorage struct {
// contains filtered or unexported fields
}
EprsParametersVotingStorage implements data.EprsParametersVotingStorage.
func (*EprsParametersVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *EprsParametersVotingStorage) GetEarliestUnfinishedVotings() ([]data.EprsParametersVoting, error)
func (*EprsParametersVotingStorage) GetLatest ¶
func (s *EprsParametersVotingStorage) GetLatest() (*data.EprsParametersVoting, error)
GetLatest eprs parameters voting.
func (*EprsParametersVotingStorage) Insert ¶
func (s *EprsParametersVotingStorage) Insert(votings ...data.EprsParametersVoting) error
func (*EprsParametersVotingStorage) Update ¶
func (s *EprsParametersVotingStorage) Update(voting *data.EprsParametersVoting) error
type GeneralUpdateVotingStorage ¶
type GeneralUpdateVotingStorage struct {
// contains filtered or unexported fields
}
GeneralUpdateVotingStorage implements data.GeneralUpdateVotingStorage.
func (*GeneralUpdateVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *GeneralUpdateVotingStorage) GetEarliestUnfinishedVotings() ([]data.GeneralUpdateVoting, error)
func (*GeneralUpdateVotingStorage) GetLatest ¶
func (s *GeneralUpdateVotingStorage) GetLatest() (*data.GeneralUpdateVoting, error)
GetLatest general update voting.
func (*GeneralUpdateVotingStorage) Insert ¶
func (s *GeneralUpdateVotingStorage) Insert(votings ...data.GeneralUpdateVoting) error
func (*GeneralUpdateVotingStorage) Update ¶
func (s *GeneralUpdateVotingStorage) Update(voting *data.GeneralUpdateVoting) error
type PaymentStorage ¶
type PaymentStorage struct {
// contains filtered or unexported fields
}
func (*PaymentStorage) Select ¶
func (s *PaymentStorage) Select(params *data.SelectPaymentsParams) ([]data.Payment, error)
type QTokenHolderVotesStorage ¶ added in v1.0.0
type QTokenHolderVotesStorage struct {
*VotingEventsStorage
}
QTokenHolderVotesStorage implements data.QTokenHolderVotesStorage.
func (*QTokenHolderVotesStorage) SelectAggregated ¶ added in v1.0.0
func (s *QTokenHolderVotesStorage) SelectAggregated(params data.SelectVotingEventsParams) (data.CountVotingEvents, error)
SelectAggregated q token holder aggregated votes with params.
type RootNodeApprovalsStorage ¶ added in v1.0.0
type RootNodeApprovalsStorage struct {
// contains filtered or unexported fields
}
RootNodeApprovalsStorage implements data.RootNodeApproval.
func (*RootNodeApprovalsStorage) GetLatest ¶ added in v1.0.0
func (s *RootNodeApprovalsStorage) GetLatest() (approval *data.RootNodeApproval, err error)
func (*RootNodeApprovalsStorage) Insert ¶ added in v1.0.0
func (s *RootNodeApprovalsStorage) Insert(approvals ...data.RootNodeApproval) error
func (*RootNodeApprovalsStorage) Select ¶ added in v1.0.0
func (s *RootNodeApprovalsStorage) Select(params data.SelectRootNodeApprovalParams, highestBlock uint64) (data.RootNodeBreakdown, error)
Select blocks with params.
type RootNodeProposalsStorage ¶ added in v1.0.0
type RootNodeProposalsStorage struct {
*VotingEventsStorage
}
RootNodeProposalsStorage implements data.VoteStorage.
func (*RootNodeProposalsStorage) SelectAggregated ¶ added in v1.0.0
func (s *RootNodeProposalsStorage) SelectAggregated(params data.SelectVotingEventsParams) (data.CountVotingEvents, error)
SelectAggregated root node aggregated proposals with params.
type RootNodeVotesStorage ¶ added in v1.0.0
type RootNodeVotesStorage struct {
*VotingEventsStorage
}
RootNodeVotesStorage implements data.VoteStorage.
func (*RootNodeVotesStorage) SelectAggregated ¶ added in v1.0.0
func (s *RootNodeVotesStorage) SelectAggregated(params data.SelectVotingEventsParams) (data.CountVotingEvents, error)
SelectAggregated root node aggregated votes with params.
type RootnodesSlashingVotingStorage ¶
type RootnodesSlashingVotingStorage struct {
// contains filtered or unexported fields
}
RootnodesSlashingVotingStorage implements data.RootnodesSlashingVotingStorage.
func (*RootnodesSlashingVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *RootnodesSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.RootnodesSlashingVoting, error)
func (*RootnodesSlashingVotingStorage) GetLatest ¶
func (s *RootnodesSlashingVotingStorage) GetLatest() (*data.RootnodesSlashingVoting, error)
GetLatest rootnodes slashing voting.
func (*RootnodesSlashingVotingStorage) Insert ¶
func (s *RootnodesSlashingVotingStorage) Insert(votings ...data.RootnodesSlashingVoting) error
func (*RootnodesSlashingVotingStorage) Update ¶
func (s *RootnodesSlashingVotingStorage) Update(voting *data.RootnodesSlashingVoting) error
type RootsMembershipStorage ¶ added in v1.0.0
type RootsMembershipStorage struct {
// contains filtered or unexported fields
}
RootsMembershipStorage implements data.RootsVotingStorage.
func (*RootsMembershipStorage) Erase ¶ added in v1.0.0
func (s *RootsMembershipStorage) Erase(fromID uint64) error
Erase all history starting fromID inclusively.
func (*RootsMembershipStorage) FindNextPeriodByAddress ¶ added in v1.0.0
func (s *RootsMembershipStorage) FindNextPeriodByAddress(rootAddress string, startBlock int64) (*data.RootsMembership, error)
func (*RootsMembershipStorage) GetLatest ¶ added in v1.0.0
func (s *RootsMembershipStorage) GetLatest() (*data.RootsMembership, error)
GetLatest roots voting.
func (*RootsMembershipStorage) GetUnfinishedPeriodByAddress ¶ added in v1.0.0
func (s *RootsMembershipStorage) GetUnfinishedPeriodByAddress(rootAddress string) (*data.RootsMembership, error)
func (*RootsMembershipStorage) GetUnfinishedPeriods ¶ added in v1.0.0
func (s *RootsMembershipStorage) GetUnfinishedPeriods() ([]data.RootsMembership, error)
func (*RootsMembershipStorage) Insert ¶ added in v1.0.0
func (s *RootsMembershipStorage) Insert(rnMembership *data.RootsMembership) error
func (*RootsMembershipStorage) Select ¶ added in v1.0.0
func (s *RootsMembershipStorage) Select(params *data.SelectRootsMembershipParams) ([]data.RootsMembership, error)
Select root membership periods with params.
func (*RootsMembershipStorage) SelectActiveRootAddresses ¶ added in v1.0.8
func (s *RootsMembershipStorage) SelectActiveRootAddresses() ([]string, error)
func (*RootsMembershipStorage) Update ¶ added in v1.0.0
func (s *RootsMembershipStorage) Update(rnMembership *data.RootsMembership) error
type RootsVotingStorage ¶
type RootsVotingStorage struct {
// contains filtered or unexported fields
}
RootsVotingStorage implements data.RootsVotingStorage.
func (*RootsVotingStorage) GetEarliestUnfinishedVotingIds ¶ added in v1.0.0
func (s *RootsVotingStorage) GetEarliestUnfinishedVotingIds() ([]uint64, error)
func (*RootsVotingStorage) GetLatest ¶
func (s *RootsVotingStorage) GetLatest() (*data.RootsVoting, error)
GetLatest roots voting.
func (*RootsVotingStorage) Insert ¶
func (s *RootsVotingStorage) Insert(votings ...data.RootsVoting) error
func (*RootsVotingStorage) Update ¶
func (s *RootsVotingStorage) Update(voting *data.RootsVoting) error
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage backed by postgres.
func (*Storage) ConstitutionVotings ¶
func (s *Storage) ConstitutionVotings() data.ConstitutionVotingStorage
ConstitutionVotings storage.
func (*Storage) ContractRegistryAddressVotings ¶
func (s *Storage) ContractRegistryAddressVotings() data.ContractRegistryAddressVotingStorage
ContractRegistryAddressVotings storage.
func (*Storage) ContractRegistryUpgradeVotings ¶
func (s *Storage) ContractRegistryUpgradeVotings() data.ContractRegistryUpgradeVotingStorage
ContractRegistryUpgradeVotings storage.
func (*Storage) EmergencyUpdateVotings ¶
func (s *Storage) EmergencyUpdateVotings() data.EmergencyUpdateVotingStorage
EmergencyUpdateVotings storage.
func (*Storage) EpdrMembershipVotings ¶
func (s *Storage) EpdrMembershipVotings() data.EpdrMembershipVotingStorage
EpdrMembershipVotings storage.
func (*Storage) EpdrParametersVotings ¶
func (s *Storage) EpdrParametersVotings() data.EpdrParametersVotingStorage
EpdrParametersVotings storage.
func (*Storage) EpqfiMembershipVotings ¶
func (s *Storage) EpqfiMembershipVotings() data.EpqfiMembershipVotingStorage
EpqfiMembershipVotings storage.
func (*Storage) EpqfiParametersVotings ¶
func (s *Storage) EpqfiParametersVotings() data.EpqfiParametersVotingStorage
EpqfiParametersVotings storage.
func (*Storage) EprsMembershipVotings ¶
func (s *Storage) EprsMembershipVotings() data.EprsMembershipVotingStorage
EprsMembershipVotings storage.
func (*Storage) EprsParametersVotings ¶
func (s *Storage) EprsParametersVotings() data.EprsParametersVotingStorage
EprsParametersVotings storage.
func (*Storage) GeneralUpdateVotings ¶
func (s *Storage) GeneralUpdateVotings() data.GeneralUpdateVotingStorage
GeneralUpdateVotings storage.
func (*Storage) LayerZeroLists ¶ added in v1.0.0
func (s *Storage) LayerZeroLists() data.LayerZeroListStorage
LayerZeroLists storage
func (*Storage) QTokenHolderVotes ¶ added in v1.0.0
func (s *Storage) QTokenHolderVotes() data.QTokenHolderVotesStorage
QTokenHolderVotes storage.
func (*Storage) RootNodeApprovals ¶ added in v1.0.0
func (s *Storage) RootNodeApprovals() data.RootNodeApprovalsStorage
RootNodeApprovals storage.
func (*Storage) RootNodeProposals ¶ added in v1.0.0
func (s *Storage) RootNodeProposals() data.RootNodeProposalsStorage
RootNodeProposals storage.
func (*Storage) RootNodeVotes ¶ added in v1.0.0
func (s *Storage) RootNodeVotes() data.RootNodeVotesStorage
RootNodeVotes storage.
func (*Storage) RootnodesSlashingVotings ¶
func (s *Storage) RootnodesSlashingVotings() data.RootnodesSlashingVotingStorage
RootnodesSlashingVotings storage.
func (*Storage) RootsMembership ¶ added in v1.0.0
func (s *Storage) RootsMembership() data.RootsMembershipStorage
RootsMembership storage.
func (*Storage) RootsVotings ¶
func (s *Storage) RootsVotings() data.RootsVotingStorage
RootsVotings storage.
func (*Storage) SummaryMetrics ¶
func (s *Storage) SummaryMetrics() data.SummaryMetricsStorage
SummaryMetrics.
func (*Storage) SystemContracts ¶ added in v1.0.0
func (s *Storage) SystemContracts() data.SystemContractsStorage
SystemContracts storage.
func (*Storage) Transactions ¶
func (s *Storage) Transactions() data.TransactionStorage
Transactions.
func (*Storage) ValidatorsSlashingVotings ¶
func (s *Storage) ValidatorsSlashingVotings() data.ValidatorsSlashingVotingStorage
ValidatorsSlashingVotings storage.
func (*Storage) Variables ¶ added in v1.0.0
func (s *Storage) Variables() data.VariableStorage
Variables storage.
func (*Storage) VotingAgents ¶ added in v1.0.0
func (s *Storage) VotingAgents() data.VotingAgentStorage
VotingAgents storage.
type SummaryMetricsStorage ¶
type SummaryMetricsStorage struct {
// contains filtered or unexported fields
}
SummaryMetricsStorage implements data.SummaryMetricsStorage.
func (*SummaryMetricsStorage) Select ¶
func (s *SummaryMetricsStorage) Select(params *data.SelectSummaryMetricsParams) ([]data.SummaryMetrics, error)
Select blocks with params. The SQL query: WITH block_metrics AS (
SELECT MAX(id) - 1000*101 + 1 AS min_block, MAX(id) AS max_block FROM blocks
), calculations AS (
SELECT b.mainaccount AS main_account, SUM(CASE WHEN b.signer = b.inturn_signer THEN 1 ELSE 0 END) AS total_inturn_blocks, (select count(bk.inturn_signer) from blocks bk where bk.inturn_signer = b.signer) AS total_due_blocks, count(b.signer) as total_produced, b.signer AS signer FROM blocks b WHERE b.id BETWEEN (SELECT min_block FROM block_metrics) AND (SELECT max_block FROM block_metrics) GROUP BY b.mainaccount, b.signer
) SELECT
main_account, signer, total_inturn_blocks, total_due_blocks, total_produced-total_inturn_blocks AS total_outofturn_blocks, CASE WHEN total_due_blocks = 0 THEN 0 ELSE total_inturn_blocks::float / total_due_blocks END AS availability
FROM calculations;
type TransactionStorage ¶
type TransactionStorage struct {
// contains filtered or unexported fields
}
func (*TransactionStorage) Get ¶
func (s *TransactionStorage) Get(hash string) (*data.Transaction, error)
Get Transaction by hash.
func (*TransactionStorage) Insert ¶
func (s *TransactionStorage) Insert(txs ...data.Transaction) error
Insert txs.
func (*TransactionStorage) Select ¶
func (s *TransactionStorage) Select(params *data.SelectTxsParams) ([]data.Transaction, error)
Select txs.
type ValidatorsSlashingVotingStorage ¶
type ValidatorsSlashingVotingStorage struct {
// contains filtered or unexported fields
}
ValidatorsSlashingVotingStorage implements data.ValidatorsSlashingVotingStorage.
func (*ValidatorsSlashingVotingStorage) GetEarliestUnfinishedVotings ¶
func (s *ValidatorsSlashingVotingStorage) GetEarliestUnfinishedVotings() ([]data.ValidatorsSlashingVoting, error)
func (*ValidatorsSlashingVotingStorage) GetLatest ¶
func (s *ValidatorsSlashingVotingStorage) GetLatest() (*data.ValidatorsSlashingVoting, error)
GetLatest validators slashing voting.
func (*ValidatorsSlashingVotingStorage) Insert ¶
func (s *ValidatorsSlashingVotingStorage) Insert(votings ...data.ValidatorsSlashingVoting) error
func (*ValidatorsSlashingVotingStorage) Update ¶
func (s *ValidatorsSlashingVotingStorage) Update(voting *data.ValidatorsSlashingVoting) error
type VariableStorage ¶ added in v1.0.0
type VariableStorage struct {
// contains filtered or unexported fields
}
VariableStorage implements data.VariableStorage.
func (*VariableStorage) Erase ¶ added in v1.0.0
func (s *VariableStorage) Erase(name string) error
Erase all history starting fromID inclusively.
func (*VariableStorage) GetByName ¶ added in v1.0.0
func (s *VariableStorage) GetByName(name string) (*data.Variable, error)
type VotingAgentStorage ¶ added in v1.0.0
type VotingAgentStorage struct {
// contains filtered or unexported fields
}
VotingAgentStorage implements data.VotingAgent.
func (*VotingAgentStorage) GetByVotingAgents ¶ added in v1.0.0
func (s *VotingAgentStorage) GetByVotingAgents(address ...string) ([]data.VotingAgent, error)
func (*VotingAgentStorage) GetLatestBlock ¶ added in v1.0.0
func (s *VotingAgentStorage) GetLatestBlock() (int64, error)
func (*VotingAgentStorage) Insert ¶ added in v1.0.0
func (s *VotingAgentStorage) Insert(agents ...data.VotingAgent) error
type VotingEventsStorage ¶ added in v1.0.0
type VotingEventsStorage struct {
// contains filtered or unexported fields
}
VotingEventsStorage implements data.VotingEvent.
func (*VotingEventsStorage) Erase ¶ added in v1.0.0
func (s *VotingEventsStorage) Erase(fromID uint64) error
Erase all history starting fromID inclusively.
func (*VotingEventsStorage) GetByLatestByType ¶ added in v1.0.0
func (s *VotingEventsStorage) GetByLatestByType(votingType string) (*data.VotingEvent, error)
func (*VotingEventsStorage) Insert ¶ added in v1.0.0
func (s *VotingEventsStorage) Insert(votingEvents ...data.VotingEvent) error
func (*VotingEventsStorage) Select ¶ added in v1.0.0
func (s *VotingEventsStorage) Select(params data.SelectVotingEventsParams, addresses []string) ([]data.VotingEvent, error)
Select current onchain root nodes votes with params.
type VotingStorage ¶
type VotingStorage struct {
// contains filtered or unexported fields
}
VotingStorage implements all votings from package data.
func (*VotingStorage) Select ¶
func (s *VotingStorage) Select(params *data.SelectVotingsParams) ([]interface{}, error)
Select blocks with params.
func (*VotingStorage) Union ¶
func (s *VotingStorage) Union(mainQuery *squirrel.SelectBuilder, query squirrel.SelectBuilder) error
Source Files ¶
- block.go
- constitutionVoting.go
- contractRegistryAddressVoting.go
- contractRegistryUpgradeVoting.go
- emergencyUpdateVoting.go
- epdrMembershipVoting.go
- epdrParametersVoting.go
- epqfiMembershipVoting.go
- epqfiParametersVoting.go
- eprsMembershipVoting.go
- eprsParametersVoting.go
- generalUpdateVoting.go
- layer_zero_list.go
- metricssummary.go
- payment.go
- qTokenHolderVotes.go
- rootNodeApprovals.go
- rootNodeProposals.go
- rootNodeVotes.go
- rootnodesSlashingVoting.go
- rootsMembership.go
- rootsVoting.go
- storage.go
- system_contract.go
- transaction.go
- validatorsSlashingVoting.go
- variables.go
- votingAgents.go
- votingEvents.go
- votings.go