Documentation ¶
Index ¶
- func NewLayerZeroListsHandler(log *logan.Entry, storage data.LayerZeroListStorage, cachePeriod time.Duration, ...) layerZeroListsHandler
- func NewSystemContractsHandler(log *logan.Entry, storage data.SystemContractsStorage) systemContractsHandler
- type EventHandler
- type QTokenHolderVotesHandler
- type RootNodeApprovalsHandler
- type RootNodeProposalsHandler
- type RootNodeVotesHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSystemContractsHandler ¶
func NewSystemContractsHandler(log *logan.Entry, storage data.SystemContractsStorage) systemContractsHandler
Types ¶
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(log *logan.Entry, ethclient *ethclient.Client, registry *contracts.Registry, storage data.RootsMembershipStorage, ) EventHandler
type QTokenHolderVotesHandler ¶
type QTokenHolderVotesHandler struct { EventHandler // contains filtered or unexported fields }
func NewQTokenHolderVotesHandler ¶
func NewQTokenHolderVotesHandler(eventHandler EventHandler, storage data.QTokenHolderVotesStorage) QTokenHolderVotesHandler
func (*QTokenHolderVotesHandler) GetQTokenHolderAggregatedVotes ¶
func (h *QTokenHolderVotesHandler) GetQTokenHolderAggregatedVotes(w http.ResponseWriter, r *http.Request)
GetQTokenHolderAggregatedVotes returns aggregated q token holder votes. @Summary Get aggregated q token holder votes @Description Returns aggregated q token holder votes. @ID q-token-holder-votings-aggregated @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.AggregatedEventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/q-token-holder-votings/aggregated [get]
func (*QTokenHolderVotesHandler) GetQTokenHolderVotes ¶
func (h *QTokenHolderVotesHandler) GetQTokenHolderVotes(w http.ResponseWriter, r *http.Request)
GetQTokenHolderVotes returns q token holder votes. @Summary Get q token holder votes @Description Returns q token holder votes. @ID q-token-holder-votings @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.EventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/q-token-holder-votings [get]
type RootNodeApprovalsHandler ¶
type RootNodeApprovalsHandler struct {
// contains filtered or unexported fields
}
func NewRootNodeApprovalsHandler ¶
func NewRootNodeApprovalsHandler(log *logan.Entry, client *ethclient.Client, storage data.RootNodeApprovalsStorage, registryCfg config.ContractsRegistry, ) RootNodeApprovalsHandler
func (*RootNodeApprovalsHandler) GetRootNodeApprovals ¶
func (h *RootNodeApprovalsHandler) GetRootNodeApprovals(w http.ResponseWriter, r *http.Request)
GetRootNodeApprovals returns root node metrics. @Summary Get root node metrics @Description Returns root node metrics (approvals of transition blocks aka co-sign). @ID root-node-metrics @Accept json @Produce json @Param filter[cycles] query int false "Filter by amount of cycles. Zero is not allowed" @Param filter[rootAddress] query string false "Filter by address of root node." @Param filter[blocksDelay] query int false "Exclude `blocksDelay` blocks before the latest." @Param sort query string false "Sorting order. Default - `desc`" @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.RootNodeApprovalsList @Failure 400 "Bad request" @Failure 500 "Internal Server Error" @Router /root-node-metrics [get]
type RootNodeProposalsHandler ¶
type RootNodeProposalsHandler struct { EventHandler // contains filtered or unexported fields }
func NewRootNodeProposalsHandler ¶
func NewRootNodeProposalsHandler(eventHandler EventHandler, storage data.RootNodeProposalsStorage) RootNodeProposalsHandler
func (*RootNodeProposalsHandler) GetRootNodeAggregatedProposals ¶
func (h *RootNodeProposalsHandler) GetRootNodeAggregatedProposals(w http.ResponseWriter, r *http.Request)
GetRootNodeAggregatedProposals returns aggregated root node proposals. @Summary Get aggregated root node proposals @Description Returns aggregated root node proposals. @ID rootnode-proposals-aggregated @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.AggregatedEventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/rootnode-proposals/aggregated [get]
func (*RootNodeProposalsHandler) GetRootNodeProposals ¶
func (h *RootNodeProposalsHandler) GetRootNodeProposals(w http.ResponseWriter, r *http.Request)
GetRootNodeProposals returns root node proposals. @Summary Get root node proposals @Description Returns root node proposals. @ID rootnode-proposals @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param filter[aggregate] query bool false "Aggregate result for all root nodes" @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.EventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/rootnode-proposals [get]
type RootNodeVotesHandler ¶
type RootNodeVotesHandler struct { EventHandler // contains filtered or unexported fields }
func NewRootNodeVotesHandler ¶
func NewRootNodeVotesHandler(eventHandler EventHandler, storage data.RootNodeVotesStorage) RootNodeVotesHandler
func (*RootNodeVotesHandler) GetRootNodeAggregatedVotes ¶
func (h *RootNodeVotesHandler) GetRootNodeAggregatedVotes(w http.ResponseWriter, r *http.Request)
GetRootNodeAggregatedVotes returns aggregated root node votes. @Summary Get aggregated root node votes @Description Returns aggregated root node votes. @ID rootnode-votings-aggregated @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.AggregatedEventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/rootnode-votings/aggregated [get]
func (*RootNodeVotesHandler) GetRootNodeVotes ¶
func (h *RootNodeVotesHandler) GetRootNodeVotes(w http.ResponseWriter, r *http.Request)
GetRootNodeVotes returns root node votes. @Summary Get root node votes @Description Returns root node votes. @ID rootnode-votings @Accept json @Produce json @Param filter[rootAddress] query string false "Returns ALL root node proposals for `rootAddress`." @Param filter[startBlock] query int false "Returns root node proposals after `startBlock`." @Param sort query string false "Sorting order. Supported values: `account_address` (sort by account_address, asc), `-block` (sort by account_address, desc). Default - `-account_address`." @Param page[cursor] query string false "Filter by last seen element." @Param page[limit] query int false "Number of elements on page, max allowed value - `100`. Default value - `20`." @Success 200 {object} resources.EventsList @Failure 400 "Bad request" @Failure 404 "Not Found" @Failure 500 "Internal Server Error" @Failure default "Page not found" @Router /root-node-metrics/rootnode-votings [get]