-
Notifications
You must be signed in to change notification settings - Fork 2
/
tx.go
46 lines (37 loc) · 1.22 KB
/
tx.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package rest
// The packages below are commented out at first to prevent an error if this file isn't initially saved.
import (
// "bytes"
// "net/http"
"github.com/gorilla/mux"
"github.com/fibonacci-chain/fbc/libs/cosmos-sdk/client/context"
// sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types"
// "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types/rest"
// "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/x/auth/client/utils"
// "github.com/fibonacci-chain/fbc/x/farm/types"
)
func registerTxRoutes(cliCtx context.CLIContext, r *mux.Router) {
// r.HandleFunc(
// TODO: Define the Rest route ,
// Call the function which should be executed for this route),
// ).Methods("POST")
}
/*
// Action TX body
type <Action>Req struct {
BaseReq rest.BaseReq `json:"base_req" yaml:"base_req"`
// TODO: Define more types if needed
}
func <Action>RequestHandlerFn(cliCtx context.CLIContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req <Action>Req
vars := mux.Vars(r)
baseReq := req.BaseReq.Sanitize()
if !baseReq.ValidateBasic(w) {
return
}
// TODO: Define the module tx logic for this action
utils.WriteGenerateStdTxResponse(w, cliCtx, BaseReq, []sdk.Msg{msg})
}
}
*/