Add GetTx gRPC endpoint (#7688)
* Add empty TxByHash * Fix search & replace * Renname to GetTx * Make getTx grpc work * Hash as string * Add todo comment * /tx * Make tests pass * Put into function * Add changelog * Fix lint * RegisterTxService in server * Remove comment * Update proto/cosmos/tx/v1beta1/service.proto Co-authored-by: Cory <cjlevinson@gmail.com> * Create new protoCdc * Move tx service to x/auth * Small tweaks * Link gh issue * Fix lint * Update x/auth/tx/service.go Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: Cory <cjlevinson@gmail.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com> Co-authored-by: SaReN <sahithnarahari@gmail.com>
This commit is contained in:
co-authored by
Cory
Aleksandr Bezobchuk
Federico Kunze
SaReN
parent
b2bc32f3c9
commit
1961935fc7
@@ -231,6 +231,9 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App
|
||||
return err
|
||||
}
|
||||
|
||||
// Add the tx service to the gRPC router.
|
||||
app.RegisterTxService(clientCtx)
|
||||
|
||||
var apiSrv *api.Server
|
||||
|
||||
config := config.GetConfig(ctx.Viper)
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
tmtypes "github.com/tendermint/tendermint/types"
|
||||
dbm "github.com/tendermint/tm-db"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/server/api"
|
||||
"github.com/cosmos/cosmos-sdk/server/config"
|
||||
)
|
||||
@@ -37,6 +38,10 @@ type (
|
||||
// RegisterGRPCServer registers gRPC services directly with the gRPC
|
||||
// server.
|
||||
RegisterGRPCServer(grpc.Server)
|
||||
|
||||
// RegisterTxService registers the gRPC Query service for tx (such as tx
|
||||
// simulation, fetching txs by hash...).
|
||||
RegisterTxService(clientCtx client.Context)
|
||||
}
|
||||
|
||||
// AppCreator is a function that allows us to lazily initialize an
|
||||
|
||||
Reference in New Issue
Block a user