Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cosmos upgrade v19.2.0 #1036

Merged
merged 5 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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