From 427527c7804aefcfcbb123b07ceace1d660bdc3c Mon Sep 17 00:00:00 2001 From: Mariano <9205080+marianososto@users.noreply.github.com> Date: Thu, 25 Apr 2024 09:49:55 -0300 Subject: [PATCH] update endpoint name --- api/docs/docs.go | 30 +++++++++++++++---- api/docs/swagger.json | 30 +++++++++++++++---- api/docs/swagger.yaml | 26 ++++++++++++++-- api/routes/wormscan/routes.go | 2 +- .../wormscan/transactions/controller.go | 4 +-- 5 files changed, 76 insertions(+), 16 deletions(-) diff --git a/api/docs/docs.go b/api/docs/docs.go index a49382fa..d8c0ff52 100644 --- a/api/docs/docs.go +++ b/api/docs/docs.go @@ -1760,7 +1760,7 @@ const docTemplate = `{ } } }, - "/api/v1/x-chain-activity/search": { + "/api/v1/x-chain-activity/tops": { "get": { "description": "Search, for a specific period of time, the number of transactions and the volume.", "tags": [ @@ -3681,7 +3681,6 @@ const docTemplate = `{ 14, 15, 16, - 17, 18, 19, 20, @@ -3689,24 +3688,35 @@ const docTemplate = `{ 22, 23, 24, + 25, 26, 28, 29, 30, 32, + 33, 34, 35, + 36, + 37, + 38, + 39, 3104, 4000, 4001, 4002, 4003, 4004, + 4005, + 4006, + 4007, + 4008, 10002, 10003, 10004, 10005, - 10006 + 10006, + 10007 ], "x-enum-varnames": [ "ChainIDUnset", @@ -3726,7 +3736,6 @@ const docTemplate = `{ "ChainIDCelo", "ChainIDNear", "ChainIDMoonbeam", - "ChainIDNeon", "ChainIDTerra2", "ChainIDInjective", "ChainIDOsmosis", @@ -3734,24 +3743,35 @@ const docTemplate = `{ "ChainIDAptos", "ChainIDArbitrum", "ChainIDOptimism", + "ChainIDGnosis", "ChainIDPythNet", "ChainIDXpla", "ChainIDBtc", "ChainIDBase", "ChainIDSei", + "ChainIDRootstock", "ChainIDScroll", "ChainIDMantle", + "ChainIDBlast", + "ChainIDXLayer", + "ChainIDLinea", + "ChainIDBerachain", "ChainIDWormchain", "ChainIDCosmoshub", "ChainIDEvmos", "ChainIDKujira", "ChainIDNeutron", "ChainIDCelestia", + "ChainIDStargaze", + "ChainIDSeda", + "ChainIDDymension", + "ChainIDProvenance", "ChainIDSepolia", "ChainIDArbitrumSepolia", "ChainIDBaseSepolia", "ChainIDOptimismSepolia", - "ChainIDHolesky" + "ChainIDHolesky", + "ChainIDPolygonSepolia" ] }, "vaa.VaaDoc": { diff --git a/api/docs/swagger.json b/api/docs/swagger.json index 44697db7..e6882765 100644 --- a/api/docs/swagger.json +++ b/api/docs/swagger.json @@ -1753,7 +1753,7 @@ } } }, - "/api/v1/x-chain-activity/search": { + "/api/v1/x-chain-activity/tops": { "get": { "description": "Search, for a specific period of time, the number of transactions and the volume.", "tags": [ @@ -3674,7 +3674,6 @@ 14, 15, 16, - 17, 18, 19, 20, @@ -3682,24 +3681,35 @@ 22, 23, 24, + 25, 26, 28, 29, 30, 32, + 33, 34, 35, + 36, + 37, + 38, + 39, 3104, 4000, 4001, 4002, 4003, 4004, + 4005, + 4006, + 4007, + 4008, 10002, 10003, 10004, 10005, - 10006 + 10006, + 10007 ], "x-enum-varnames": [ "ChainIDUnset", @@ -3719,7 +3729,6 @@ "ChainIDCelo", "ChainIDNear", "ChainIDMoonbeam", - "ChainIDNeon", "ChainIDTerra2", "ChainIDInjective", "ChainIDOsmosis", @@ -3727,24 +3736,35 @@ "ChainIDAptos", "ChainIDArbitrum", "ChainIDOptimism", + "ChainIDGnosis", "ChainIDPythNet", "ChainIDXpla", "ChainIDBtc", "ChainIDBase", "ChainIDSei", + "ChainIDRootstock", "ChainIDScroll", "ChainIDMantle", + "ChainIDBlast", + "ChainIDXLayer", + "ChainIDLinea", + "ChainIDBerachain", "ChainIDWormchain", "ChainIDCosmoshub", "ChainIDEvmos", "ChainIDKujira", "ChainIDNeutron", "ChainIDCelestia", + "ChainIDStargaze", + "ChainIDSeda", + "ChainIDDymension", + "ChainIDProvenance", "ChainIDSepolia", "ChainIDArbitrumSepolia", "ChainIDBaseSepolia", "ChainIDOptimismSepolia", - "ChainIDHolesky" + "ChainIDHolesky", + "ChainIDPolygonSepolia" ] }, "vaa.VaaDoc": { diff --git a/api/docs/swagger.yaml b/api/docs/swagger.yaml index 92db5b78..ae8cece6 100644 --- a/api/docs/swagger.yaml +++ b/api/docs/swagger.yaml @@ -1027,7 +1027,6 @@ definitions: - 14 - 15 - 16 - - 17 - 18 - 19 - 20 @@ -1035,24 +1034,35 @@ definitions: - 22 - 23 - 24 + - 25 - 26 - 28 - 29 - 30 - 32 + - 33 - 34 - 35 + - 36 + - 37 + - 38 + - 39 - 3104 - 4000 - 4001 - 4002 - 4003 - 4004 + - 4005 + - 4006 + - 4007 + - 4008 - 10002 - 10003 - 10004 - 10005 - 10006 + - 10007 type: integer x-enum-varnames: - ChainIDUnset @@ -1072,7 +1082,6 @@ definitions: - ChainIDCelo - ChainIDNear - ChainIDMoonbeam - - ChainIDNeon - ChainIDTerra2 - ChainIDInjective - ChainIDOsmosis @@ -1080,24 +1089,35 @@ definitions: - ChainIDAptos - ChainIDArbitrum - ChainIDOptimism + - ChainIDGnosis - ChainIDPythNet - ChainIDXpla - ChainIDBtc - ChainIDBase - ChainIDSei + - ChainIDRootstock - ChainIDScroll - ChainIDMantle + - ChainIDBlast + - ChainIDXLayer + - ChainIDLinea + - ChainIDBerachain - ChainIDWormchain - ChainIDCosmoshub - ChainIDEvmos - ChainIDKujira - ChainIDNeutron - ChainIDCelestia + - ChainIDStargaze + - ChainIDSeda + - ChainIDDymension + - ChainIDProvenance - ChainIDSepolia - ChainIDArbitrumSepolia - ChainIDBaseSepolia - ChainIDOptimismSepolia - ChainIDHolesky + - ChainIDPolygonSepolia vaa.VaaDoc: properties: appId: @@ -2341,7 +2361,7 @@ paths: description: Internal Server Error tags: - wormholescan - /api/v1/x-chain-activity/search: + /api/v1/x-chain-activity/tops: get: description: Search, for a specific period of time, the number of transactions and the volume. diff --git a/api/routes/wormscan/routes.go b/api/routes/wormscan/routes.go index 382ff098..00c5a77c 100644 --- a/api/routes/wormscan/routes.go +++ b/api/routes/wormscan/routes.go @@ -85,7 +85,7 @@ func RegisterRoutes( api.Get("/last-txs", transactionCtrl.GetLastTransactions) api.Get("/scorecards", transactionCtrl.GetScorecards) api.Get("/x-chain-activity", transactionCtrl.GetChainActivity) - api.Get("/x-chain-activity/search", transactionCtrl.GetChainActivityTops) + api.Get("/x-chain-activity/tops", transactionCtrl.GetChainActivityTops) api.Get("/top-assets-by-volume", transactionCtrl.GetTopAssets) api.Get("/top-chain-pairs-by-num-transfers", transactionCtrl.GetTopChainPairs) api.Get("token/:chain/:token_address", transactionCtrl.GetTokenByChainAndAddress) diff --git a/api/routes/wormscan/transactions/controller.go b/api/routes/wormscan/transactions/controller.go index 3180eeb4..22b7a51f 100644 --- a/api/routes/wormscan/transactions/controller.go +++ b/api/routes/wormscan/transactions/controller.go @@ -184,7 +184,7 @@ func (c *Controller) GetTopAssets(ctx *fiber.Ctx) error { } // GetChainActivityTops godoc -// @Description Search, for a specific period of time, the number of transactions and the volume. +// @Description Search for a specific period of time the number of transactions and the volume. // @Tags wormholescan // @ID x-chain-activity-tops // @Method Get @@ -197,7 +197,7 @@ func (c *Controller) GetTopAssets(ctx *fiber.Ctx) error { // @Success 200 {object} transactions.ChainActivityTopResults // @Failure 400 // @Failure 500 -// @Router /api/v1/x-chain-activity/search [get] +// @Router /api/v1/x-chain-activity/tops [get] func (c *Controller) GetChainActivityTops(ctx *fiber.Ctx) error { sourceChain, err := middleware.ExtractSourceChain(ctx, c.logger)