Skip to content

Commit

Permalink
Add defi lama field to response
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Dec 13, 2024
1 parent 58d83dd commit 44ddfc8
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
56 changes: 56 additions & 0 deletions cmd/api/docs/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions cmd/api/handler/responses/rollup.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type RollupWithStats struct {
Logo string `example:"https://some_link.com/image.png" format:"string" json:"logo,omitempty" swaggertype:"string"`
Slug string `example:"rollup_slug" format:"string" json:"slug" swaggertype:"string"`
L2Beat string `example:"https://l2beat.com/scaling/projects/karak" format:"string" json:"l2_beat,omitempty" swaggertype:"string"`
DeFiLama string `example:"Manta" format:"string" json:"defi_lama,omitempty" swaggertype:"string"`
Explorer string `example:"https://explorer.karak.network/" format:"string" json:"explorer,omitempty" swaggertype:"string"`
BridgeContract string `example:"https://github.com/account" format:"string" json:"bridge,omitempty" swaggertype:"string"`
Stack string `example:"op_stack" format:"string" json:"stack,omitempty" swaggertype:"string"`
Expand Down Expand Up @@ -51,6 +52,7 @@ func NewRollupWithStats(r storage.RollupWithStats) RollupWithStats {
Website: r.Website,
Logo: r.Logo,
L2Beat: r.L2Beat,
DeFiLama: r.DeFiLama,
Explorer: r.Explorer,
BridgeContract: r.BridgeContract,
Links: r.Links,
Expand Down Expand Up @@ -82,6 +84,7 @@ type Rollup struct {
Logo string `example:"https://some_link.com/image.png" format:"string" json:"logo,omitempty" swaggertype:"string"`
Slug string `example:"rollup_slug" format:"string" json:"slug" swaggertype:"string"`
L2Beat string `example:"https://github.com/account" format:"string" json:"l2_beat,omitempty" swaggertype:"string"`
DeFiLama string `example:"Manta" format:"string" json:"defi_lama,omitempty" swaggertype:"string"`
Explorer string `example:"https://explorer.karak.network/" format:"string" json:"explorer,omitempty" swaggertype:"string"`
BridgeContract string `example:"https://github.com/account" format:"string" json:"bridge,omitempty" swaggertype:"string"`
Stack string `example:"op_stack" format:"string" json:"stack,omitempty" swaggertype:"string"`
Expand All @@ -105,6 +108,7 @@ func NewRollup(r *storage.Rollup) Rollup {
Logo: r.Logo,
Slug: r.Slug,
L2Beat: r.L2Beat,
DeFiLama: r.DeFiLama,
BridgeContract: r.BridgeContract,
Stack: r.Stack,
Explorer: r.Explorer,
Expand Down Expand Up @@ -146,6 +150,7 @@ type RollupWithDayStats struct {
Logo string `example:"https://some_link.com/image.png" format:"string" json:"logo,omitempty" swaggertype:"string"`
Slug string `example:"rollup_slug" format:"string" json:"slug" swaggertype:"string"`
L2Beat string `example:"https://l2beat.com/scaling/projects/karak" format:"string" json:"l2_beat,omitempty" swaggertype:"string"`
DeFiLama string `example:"Manta" format:"string" json:"defi_lama,omitempty" swaggertype:"string"`
Explorer string `example:"https://explorer.karak.network/" format:"string" json:"explorer,omitempty" swaggertype:"string"`
BridgeContract string `example:"https://github.com/account" format:"string" json:"bridge,omitempty" swaggertype:"string"`
Stack string `example:"op_stack" format:"string" json:"stack,omitempty" swaggertype:"string"`
Expand Down Expand Up @@ -177,6 +182,7 @@ func NewRollupWithDayStats(r storage.RollupWithDayStats) RollupWithDayStats {
Website: r.Website,
Logo: r.Logo,
L2Beat: r.L2Beat,
DeFiLama: r.DeFiLama,
Explorer: r.Explorer,
BridgeContract: r.BridgeContract,
Stack: r.Stack,
Expand Down
3 changes: 3 additions & 0 deletions pkg/node/mock/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44ddfc8

Please sign in to comment.