@@ -58,29 +58,33 @@ var (
5858
5959type (
6060 monitorStatus struct {
61- TopDisplayedBlock * big.Int
62- UpperBlock * big.Int
63- LowerBlock * big.Int
64- ChainID * big.Int
65- ForkID uint64
66- HeadBlock * big.Int
67- PeerCount uint64
68- GasPrice * big.Int
69- TxPoolStatus txPoolStatus
70- ZkEVMBatches zkEVMBatches
71- SelectedBlock rpctypes.PolyBlock
72- SelectedTransaction rpctypes.PolyTransaction
73- BlockCache * lru.Cache `json:"-"`
74- BlocksLock sync.RWMutex `json:"-"`
61+ TopDisplayedBlock * big.Int
62+ UpperBlock * big.Int
63+ LowerBlock * big.Int
64+ ChainID * big.Int
65+ ForkID uint64
66+ HeadBlock * big.Int
67+ PeerCount uint64
68+ GasPrice * big.Int
69+ TxPoolStatus txPoolStatus
70+ ZkEVMBatches zkEVMBatches
71+ SelectedBlock rpctypes.PolyBlock
72+ SelectedTransaction rpctypes.PolyTransaction
73+ BlockCache * lru.Cache `json:"-"`
74+ BlocksLock sync.RWMutex `json:"-"`
75+ RollupAddress string
76+ RollupManagerAddress string
7577 }
7678 chainState struct {
77- HeadBlock uint64
78- ChainID * big.Int
79- PeerCount uint64
80- GasPrice * big.Int
81- TxPoolStatus txPoolStatus
82- ZkEVMBatches zkEVMBatches
83- ForkID uint64
79+ HeadBlock uint64
80+ ChainID * big.Int
81+ PeerCount uint64
82+ GasPrice * big.Int
83+ TxPoolStatus txPoolStatus
84+ ZkEVMBatches zkEVMBatches
85+ ForkID uint64
86+ RollupAddress string
87+ RollupManagerAddress string
8488 }
8589 txPoolStatus struct {
8690 pending uint64
@@ -241,6 +245,16 @@ func getChainState(ctx context.Context, ec *ethclient.Client) (*chainState, erro
241245 log .Debug ().Err (err ).Msg ("Unable to get fork id" )
242246 }
243247
248+ cs .RollupAddress , err = util .GetRollupAddress (ec .Client ())
249+ if err != nil {
250+ log .Debug ().Err (err ).Msg ("Unable to get rollup address" )
251+ }
252+
253+ cs .RollupManagerAddress , err = util .GetRollupManagerAddress (ec .Client ())
254+ if err != nil {
255+ log .Debug ().Err (err ).Msg ("Unable to get rollup manager address" )
256+ }
257+
244258 return cs , nil
245259
246260}
@@ -284,6 +298,8 @@ func fetchCurrentBlockData(ctx context.Context, ec *ethclient.Client, ms *monito
284298 ms .TxPoolStatus = cs .TxPoolStatus
285299 ms .ZkEVMBatches = cs .ZkEVMBatches
286300 ms .ForkID = cs .ForkID
301+ ms .RollupAddress = cs .RollupAddress
302+ ms .RollupManagerAddress = cs .RollupManagerAddress
287303
288304 return
289305}
@@ -606,7 +622,7 @@ func renderMonitorUI(ctx context.Context, ec *ethclient.Client, ms *monitorStatu
606622 if zkEVMBatchesSupported {
607623 skeleton .ZkEVM .Text = ui .GetZkEVMText (skeleton .ZkEVM , ms .ZkEVMBatches .trusted , ms .ZkEVMBatches .virtual , ms .ZkEVMBatches .verified )
608624
609- skeleton .Rollup .Text = ui .GetRollupText (skeleton .Rollup , ms .ForkID )
625+ skeleton .Rollup .Text = ui .GetRollupText (skeleton .Rollup , ms .ForkID , ms . RollupAddress , ms . RollupManagerAddress )
610626 }
611627
612628 skeleton .TxPerBlockChart .Data = metrics .GetTxsPerBlock (renderedBlocks )
0 commit comments