Skip to content

Commit a8526df

Browse files
Feature: add total bytes to API
1 parent b756337 commit a8526df

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

cmd/api/docs/docs.go

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/api/docs/swagger.json

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/api/docs/swagger.yaml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/api/handler/responses/state.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ type State struct {
2323
TotalAccounts int64 `example:"43" format:"int64" json:"total_accounts" swaggertype:"integer"`
2424
TotalRollups int64 `example:"312" format:"int64" json:"total_rollups" swaggertype:"integer"`
2525
TotalBridges int64 `example:"312" format:"int64" json:"total_bridges" swaggertype:"integer"`
26+
TotalBytes int64 `example:"312" format:"int64" json:"total_bytes" swaggertype:"integer"`
2627
TotalSupply string `example:"312" format:"string" json:"total_supply" swaggertype:"string"`
2728
Synced bool `example:"true" format:"boolean" json:"synced" swaggertype:"boolean"`
2829
}
@@ -39,6 +40,7 @@ func NewState(state storage.State) State {
3940
TotalAccounts: state.TotalAccounts,
4041
TotalRollups: state.TotalRollups,
4142
TotalBridges: state.TotalBridges,
43+
TotalBytes: state.TotalBytes,
4244
TotalSupply: state.TotalSupply.String(),
4345
Synced: !state.LastTime.UTC().Add(2 * time.Minute).Before(time.Now().UTC()),
4446
}

0 commit comments

Comments
 (0)