mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
fa57876ad8
* unsynced querier types * unsynced querier keeper methods * unsynced querier cli * unsynced querrier rest * reward factors querier types * reward factors querier keeper methods * reward factors querier cli * reward factors querier rest * move PostClaimReq from types to rest
29 lines
760 B
Go
29 lines
760 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 (
|
|
RestDenom = "denom"
|
|
)
|
|
|
|
// RegisterRoutes registers incentive-related REST handlers to a router
|
|
func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router) {
|
|
registerQueryRoutes(cliCtx, r)
|
|
registerTxRoutes(cliCtx, r)
|
|
}
|
|
|
|
// PostClaimReq defines the properties of claim transaction's request body.
|
|
type PostClaimReq struct {
|
|
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
|
|
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
|
|
MultiplierName string `json:"multiplier_name" yaml:"multiplier_name"`
|
|
}
|