mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 16:25:21 +00:00
b2edeb8549
* cli auction query flags * update bep3 filter method name * rest auction query flags * add constants for auction type, phase * fix test * revisions
30 lines
685 B
Go
30 lines
685 B
Go
package rest
|
|
|
|
import (
|
|
"github.com/gorilla/mux"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client/context"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
"github.com/cosmos/cosmos-sdk/types/rest"
|
|
)
|
|
|
|
// REST Variable names
|
|
// nolint
|
|
const (
|
|
RestType = "type"
|
|
RestDenom = "denom"
|
|
RestPhase = "phase"
|
|
)
|
|
|
|
// RegisterRoutes - Central function to define routes that get registered by the main application
|
|
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
|
registerQueryRoutes(cliCtx, r)
|
|
registerTxRoutes(cliCtx, r)
|
|
}
|
|
|
|
// placeBidReq defines the properties of a bid request's body
|
|
type placeBidReq struct {
|
|
BaseReq rest.BaseReq `json:"base_req"`
|
|
Amount sdk.Coin `json:"amount"`
|
|
}
|