diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.lcd.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.lcd.ts index 3d7b91613c..be094fa82c 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.lcd.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.lcd.ts @@ -16,14 +16,14 @@ export class LCDQueryClient { async params(_params: QueryParamsRequest = {}): Promise { - const endpoint = `dydxprotocol/v4/vault/params`; + const endpoint = `dydxprotocol/vault/params`; return await this.req.get(endpoint); } /* Queries a Vault by type and number. */ async vault(params: QueryVaultRequest): Promise { - const endpoint = `dydxprotocol/v4/vault/vaults/${params.type}/${params.number}`; + const endpoint = `dydxprotocol/vault/vault/${params.type}/${params.number}`; return await this.req.get(endpoint); } diff --git a/proto/dydxprotocol/vault/query.proto b/proto/dydxprotocol/vault/query.proto index 019a07acb5..a2277b9bb8 100644 --- a/proto/dydxprotocol/vault/query.proto +++ b/proto/dydxprotocol/vault/query.proto @@ -13,12 +13,11 @@ option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/vault/types"; service Query { // Queries the Params. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/dydxprotocol/v4/vault/params"; + option (google.api.http).get = "/dydxprotocol/vault/params"; } // Queries a Vault by type and number. rpc Vault(QueryVaultRequest) returns (QueryVaultResponse) { - option (google.api.http).get = - "/dydxprotocol/v4/vault/vaults/{type}/{number}"; + option (google.api.http).get = "/dydxprotocol/vault/vault/{type}/{number}"; } } diff --git a/protocol/x/vault/module.go b/protocol/x/vault/module.go index 1d167f8e12..a9df488f8d 100644 --- a/protocol/x/vault/module.go +++ b/protocol/x/vault/module.go @@ -81,7 +81,12 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod } // RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module. -func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {} +func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + panic(err) + } +} // GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to // generate new transactions containing messages defined in the module. diff --git a/protocol/x/vault/types/query.pb.go b/protocol/x/vault/types/query.pb.go index ecc6d74eb1..07e853b424 100644 --- a/protocol/x/vault/types/query.pb.go +++ b/protocol/x/vault/types/query.pb.go @@ -252,39 +252,39 @@ func init() { func init() { proto.RegisterFile("dydxprotocol/vault/query.proto", fileDescriptor_478fb8dc0ff21ea6) } var fileDescriptor_478fb8dc0ff21ea6 = []byte{ - // 502 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcf, 0x6b, 0x13, 0x41, - 0x18, 0xcd, 0xc4, 0x24, 0xea, 0xb4, 0x15, 0x1c, 0x8b, 0x84, 0xb5, 0xdd, 0xc4, 0x85, 0xc6, 0x78, - 0xe8, 0x0e, 0x46, 0x45, 0x0f, 0x9e, 0x7a, 0xf3, 0xa4, 0xd9, 0x8a, 0x07, 0x0f, 0x96, 0xc9, 0x66, - 0xd8, 0x2c, 0x24, 0x33, 0x9b, 0x9d, 0xd9, 0xd0, 0xa5, 0x14, 0xc4, 0xbb, 0x20, 0x78, 0xf3, 0x2f, - 0xea, 0xb1, 0xe0, 0xc5, 0x93, 0x48, 0xe2, 0xdf, 0x21, 0xb2, 0xdf, 0x8e, 0xe9, 0x6e, 0x9b, 0xd0, - 0xcb, 0x30, 0xf3, 0xbe, 0x37, 0xef, 0x7d, 0xbf, 0xb0, 0x3d, 0x4c, 0x87, 0xc7, 0x51, 0x2c, 0xb5, - 0xf4, 0xe5, 0x98, 0xce, 0x58, 0x32, 0xd6, 0x74, 0x9a, 0xf0, 0x38, 0x75, 0x01, 0x24, 0xa4, 0x18, - 0x77, 0x21, 0x6e, 0x6d, 0x07, 0x32, 0x90, 0x80, 0xd1, 0xec, 0x96, 0x33, 0xad, 0x9d, 0x40, 0xca, - 0x60, 0xcc, 0x29, 0x8b, 0x42, 0xca, 0x84, 0x90, 0x9a, 0xe9, 0x50, 0x0a, 0x65, 0xa2, 0x8f, 0x4b, - 0x3e, 0x2a, 0x19, 0x30, 0xdf, 0x97, 0x89, 0xd0, 0xaa, 0x70, 0x37, 0xd4, 0xd6, 0x8a, 0x94, 0x22, - 0x16, 0xb3, 0xc9, 0x7f, 0xad, 0x55, 0x39, 0xc3, 0x99, 0xc7, 0x9d, 0x6d, 0x4c, 0xfa, 0x59, 0x09, - 0x6f, 0xe1, 0x93, 0xc7, 0xa7, 0x09, 0x57, 0xda, 0x79, 0x83, 0xef, 0x95, 0x50, 0x15, 0x49, 0xa1, - 0x38, 0x79, 0x89, 0x1b, 0xb9, 0x78, 0x13, 0xb5, 0x51, 0x77, 0xa3, 0x67, 0xb9, 0x57, 0x2b, 0x76, - 0xf3, 0x3f, 0x07, 0xb5, 0xb3, 0x5f, 0xad, 0x8a, 0x67, 0xf8, 0xce, 0x47, 0x7c, 0x17, 0x04, 0xdf, - 0x67, 0x14, 0xe3, 0x42, 0x9e, 0xe0, 0x9a, 0x4e, 0x23, 0x0e, 0x62, 0x77, 0x7a, 0xbb, 0xab, 0xc4, - 0x80, 0xff, 0x2e, 0x8d, 0xb8, 0x07, 0x54, 0x72, 0x1f, 0x37, 0x44, 0x32, 0x19, 0xf0, 0xb8, 0x59, - 0x6d, 0xa3, 0xee, 0x96, 0x67, 0x5e, 0xce, 0x5f, 0x64, 0xea, 0x30, 0x06, 0x26, 0xe1, 0x57, 0xf8, - 0x16, 0xe8, 0x1c, 0x85, 0x43, 0x93, 0xf2, 0x83, 0xb5, 0x2e, 0xaf, 0x87, 0x26, 0xe7, 0x9b, 0xb3, - 0xfc, 0x49, 0xfa, 0x78, 0xeb, 0x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f, 0xc4, 0x42, 0x41, 0x97, 0xc8, 0xb1, - 0xf1, 0xc8, 0xb4, 0xd5, 0xa0, 0x01, 0xf8, 0xd3, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xca, - 0xa6, 0x6c, 0x14, 0x04, 0x00, 0x00, + // 497 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcf, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xd2, 0x16, 0xf0, 0x36, 0x24, 0xcc, 0x84, 0xa2, 0x50, 0xb2, 0x12, 0x89, 0xd2, + 0x09, 0x11, 0x6b, 0x05, 0x09, 0x0e, 0x9c, 0x76, 0xe3, 0x04, 0xcd, 0x10, 0x07, 0x0e, 0x4c, 0x6e, + 0x6a, 0xa5, 0x91, 0x5a, 0x3b, 0x8d, 0x9d, 0x6a, 0xd1, 0xd4, 0x0b, 0x37, 0x6e, 0x08, 0xfe, 0xa9, + 0x1d, 0x27, 0x71, 0xe1, 0x84, 0x50, 0xcb, 0xdf, 0x81, 0x50, 0x5e, 0x4c, 0x97, 0x6e, 0xad, 0x76, + 0x89, 0xec, 0xef, 0xfb, 0xe6, 0xf3, 0x7e, 0xf8, 0x61, 0x67, 0x90, 0x0d, 0x4e, 0xe2, 0x44, 0x6a, + 0x19, 0xc8, 0x11, 0x9d, 0xb2, 0x74, 0xa4, 0xe9, 0x24, 0xe5, 0x49, 0xe6, 0x81, 0x48, 0x48, 0x39, + 0xee, 0x41, 0xdc, 0xde, 0x0d, 0x65, 0x28, 0x41, 0xa3, 0xf9, 0xa9, 0x70, 0xda, 0xcd, 0x50, 0xca, + 0x70, 0xc4, 0x29, 0x8b, 0x23, 0xca, 0x84, 0x90, 0x9a, 0xe9, 0x48, 0x0a, 0x65, 0xa2, 0xfb, 0x2b, + 0x79, 0x54, 0xda, 0x67, 0x41, 0x20, 0x53, 0xa1, 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 0x68, 0x99, 0x64, + 0x56, 0x0d, 0x42, 0x17, 0x02, 0x79, 0x84, 0xb7, 0xb5, 0xd4, 0x6c, 0x74, 0xac, 0x86, 0x2c, 0xe1, + 0xca, 0xaa, 0x83, 0x61, 0x0b, 0xb4, 0x23, 0x90, 0xba, 0xdf, 0xaa, 0xb8, 0x0e, 0x03, 0x20, 0x33, + 0xdc, 0x28, 0x9e, 0x80, 0xb4, 0xd7, 0xf5, 0x7a, 0xf5, 0xb5, 0xed, 0x27, 0xd7, 0xfa, 0x8a, 0x71, + 0xba, 0xee, 0xe7, 0x1f, 0x7f, 0xbe, 0x57, 0x9b, 0xc4, 0xa6, 0x1b, 0xd7, 0x8e, 0x7c, 0x41, 0xb8, + 0x0e, 0xf3, 0x24, 0x8f, 0x37, 0x62, 0xcb, 0x5b, 0x60, 0xb7, 0xaf, 0xb3, 0x99, 0xe4, 0x07, 0x90, + 0xfc, 0x29, 0xd9, 0xa7, 0x9b, 0x56, 0x9a, 0x9e, 0xe6, 0x3b, 0x32, 0xa3, 0xa7, 0xc5, 0x52, 0xcc, + 0x0e, 0x7b, 0x67, 0x73, 0x07, 0x9d, 0xcf, 0x1d, 0xf4, 0x7b, 0xee, 0xa0, 0xaf, 0x0b, 0xa7, 0x72, + 0xbe, 0x70, 0x2a, 0x3f, 0x17, 0x4e, 0xe5, 0xe3, 0xcb, 0x30, 0xd2, 0xc3, 0xb4, 0xef, 0x05, 0x72, + 0x7c, 0x09, 0xf7, 0xe2, 0x59, 0x30, 0x64, 0x91, 0xa0, 0x4b, 0xe5, 0xc4, 0xc0, 0x73, 0xb6, 0xea, + 0x37, 0x40, 0x7f, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xa0, 0xa0, 0xa9, 0x4d, 0x0c, 0x04, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/protocol/x/vault/types/query.pb.gw.go b/protocol/x/vault/types/query.pb.gw.go index 7cf3f8de49..246c9ee253 100644 --- a/protocol/x/vault/types/query.pb.gw.go +++ b/protocol/x/vault/types/query.pb.gw.go @@ -270,9 +270,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"dydxprotocol", "v4", "vault", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"dydxprotocol", "vault", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Vault_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"dydxprotocol", "v4", "vault", "vaults", "type", "number"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vault_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3}, []string{"dydxprotocol", "vault", "type", "number"}, "", runtime.AssumeColonVerbOpt(false))) ) var (