Add struct get state endpoint

This commit is contained in:
laisolizq
2020-10-23 17:46:34 +02:00
parent d17cc57e1d
commit 82ee7c6aa7
7 changed files with 292 additions and 151 deletions

17
api/state.go Normal file
View File

@@ -0,0 +1,17 @@
package api
import (
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/hermeznetwork/hermez-node/eth"
)
// Status define status of the network
type Status struct {
Network historydb.Network `json:"network"`
Metrics historydb.Metrics `json:"metrics"`
Rollup eth.RollupVariables `json:"rollup"`
Auction eth.AuctionVariables `json:"auction"`
WithdrawalDelayer eth.WDelayerVariables `json:"withdrawalDelayer"`
RecommendedFee common.RecommendedFee `json:"recommendedFee"`
}