Skip to content

Commit

Permalink
feat: cosmos upgrade v19.2.0 (#1036)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaladinlight authored Sep 13, 2024
1 parent f3ec9e3 commit 10b035e
Show file tree
Hide file tree
Showing 28 changed files with 1,001 additions and 2,411 deletions.
2 changes: 1 addition & 1 deletion go/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.0 as builder
FROM golang:1.22.6 as builder

ARG COINSTACK

Expand Down
4 changes: 3 additions & 1 deletion go/build/Dockerfile.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM quay.io/goswagger/swagger:v0.31.0
FROM golang:1.22.6

RUN go install github.com/go-swagger/go-swagger/cmd/[email protected]

RUN go install github.com/cespare/reflex@latest

Expand Down
91 changes: 0 additions & 91 deletions go/cmd/thorchain-v1/main.go

This file was deleted.

3 changes: 0 additions & 3 deletions go/cmd/thorchain-v1/sample.env

This file was deleted.

87 changes: 87 additions & 0 deletions go/coinstacks/cosmos/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,93 @@ func New(httpClient *cosmos.HTTPClient, grpcClient *cosmos.GRPCClient, wsClient
return a
}

// swagger:route GET / Websocket Websocket
//
// Subscribe to pending and confirmed transactions.
//
// responses:
//
// 200:
func (a *API) Websocket(w http.ResponseWriter, r *http.Request) {
a.API.Websocket(w, r)
}

// swagger:route GET /api/v1/info v1 GetInfo
//
// Get information about the running coinstack.
//
// responses:
//
// 200: Info
func (a *API) Info(w http.ResponseWriter, r *http.Request) {
a.API.Info(w, r)
}

// swagger:route GET /api/v1/account/{pubkey} v1 GetAccount
//
// Get account details.
//
// responses:
//
// 200: Account
// 400: BadRequestError
// 500: InternalServerError
func (a *API) Account(w http.ResponseWriter, r *http.Request) {
a.API.Account(w, r)
}

// swagger:route GET /api/v1/account/{pubkey}/txs v1 GetTxHistory
//
// Get paginated transaction history.
//
// responses:
//
// 200: TxHistory
// 400: BadRequestError
// 500: InternalServerError
func (a *API) TxHistory(w http.ResponseWriter, r *http.Request) {
a.API.TxHistory(w, r)
}

// swagger:route GET /api/v1/tx/{txid} v1 GetTx
//
// # Get transaction details
//
// responses:
//
// 200: Tx
// 400: BadRequestError
// 500: InternalServerError
func (a *API) Tx(w http.ResponseWriter, r *http.Request) {
a.API.Tx(w, r)
}

// swagger:route POST /api/v1/send v1 SendTx
//
// Sends raw transaction to be broadcast to the node.
//
// responses:
//
// 200: TransactionHash
// 400: BadRequestError
// 500: InternalServerError
func (a *API) SendTx(w http.ResponseWriter, r *http.Request) {
a.API.SendTx(w, r)
}

// swagger:route POST /api/v1/gas/estimate v1 EstimateGas
//
// Get the estimated gas cost for a transaction.
//
// responses:
//
// 200: GasAmount
// 400: BadRequestError
// 500: InternalServerError
func (a *API) EstimateGas(w http.ResponseWriter, r *http.Request) {
a.API.EstimateGas(w, r)
}

// swagger:route Get /api/v1/validators v1 GetValidators
//
// Get the list of current validators.
Expand Down
Loading

0 comments on commit 10b035e

Please sign in to comment.