Skip to content

Commit

Permalink
proto format
Browse files Browse the repository at this point in the history
  • Loading branch information
tqin7 committed Aug 20, 2024
1 parent f05cd9d commit 4ac98dd
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 20 deletions.
50 changes: 40 additions & 10 deletions indexer/packages/v4-protos/src/codegen/dydxprotocol/vault/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,41 +81,71 @@ export interface QueryAllVaultsResponseSDKType {
vaults: QueryVaultResponseSDKType[];
pagination?: PageResponseSDKType;
}
/** QueryMegavaultTotalSharesRequest is a request type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesRequest is a request type for the
* MegavaultTotalShares RPC method.
*/

export interface QueryMegavaultTotalSharesRequest {}
/** QueryMegavaultTotalSharesRequest is a request type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesRequest is a request type for the
* MegavaultTotalShares RPC method.
*/

export interface QueryMegavaultTotalSharesRequestSDKType {}
/** QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesResponse is a response type for the
* MegavaultTotalShares RPC method.
*/

export interface QueryMegavaultTotalSharesResponse {
/** QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesResponse is a response type for the
* MegavaultTotalShares RPC method.
*/
totalShares?: NumShares;
}
/** QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesResponse is a response type for the
* MegavaultTotalShares RPC method.
*/

export interface QueryMegavaultTotalSharesResponseSDKType {
/** QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method. */
/**
* QueryMegavaultTotalSharesResponse is a response type for the
* MegavaultTotalShares RPC method.
*/
total_shares?: NumSharesSDKType;
}
/** QueryMegavaultOwnerSharesRequest is a request type for the MegavaultOwnerShares RPC method. */
/**
* QueryMegavaultOwnerSharesRequest is a request type for the
* MegavaultOwnerShares RPC method.
*/

export interface QueryMegavaultOwnerSharesRequest {
pagination?: PageRequest;
}
/** QueryMegavaultOwnerSharesRequest is a request type for the MegavaultOwnerShares RPC method. */
/**
* QueryMegavaultOwnerSharesRequest is a request type for the
* MegavaultOwnerShares RPC method.
*/

export interface QueryMegavaultOwnerSharesRequestSDKType {
pagination?: PageRequestSDKType;
}
/** QueryMegavaultOwnerSharesResponse is a response type for the MegavaultOwnerShares RPC method. */
/**
* QueryMegavaultOwnerSharesResponse is a response type for the
* MegavaultOwnerShares RPC method.
*/

export interface QueryMegavaultOwnerSharesResponse {
ownerShares: OwnerShare[];
pagination?: PageResponse;
}
/** QueryMegavaultOwnerSharesResponse is a response type for the MegavaultOwnerShares RPC method. */
/**
* QueryMegavaultOwnerSharesResponse is a response type for the
* MegavaultOwnerShares RPC method.
*/

export interface QueryMegavaultOwnerSharesResponseSDKType {
owner_shares: OwnerShareSDKType[];
Expand Down
18 changes: 12 additions & 6 deletions proto/dydxprotocol/vault/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ service Query {
option (google.api.http).get = "/dydxprotocol/vault/vault";
}
// Queries total shares of megavault.
rpc MegavaultTotalShares(QueryMegavaultTotalSharesRequest) returns (QueryMegavaultTotalSharesResponse) {
rpc MegavaultTotalShares(QueryMegavaultTotalSharesRequest)
returns (QueryMegavaultTotalSharesResponse) {
option (google.api.http).get = "/dydxprotocol/vault/megavault/total_shares";
}
// Queries owner shares of megavault.
rpc MegavaultOwnerShares(QueryMegavaultOwnerSharesRequest) returns (QueryMegavaultOwnerSharesResponse) {
rpc MegavaultOwnerShares(QueryMegavaultOwnerSharesRequest)
returns (QueryMegavaultOwnerSharesResponse) {
option (google.api.http).get = "/dydxprotocol/vault/megavault/owner_shares";
}
}
Expand Down Expand Up @@ -80,18 +82,22 @@ message QueryAllVaultsResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

// QueryMegavaultTotalSharesRequest is a request type for the MegavaultTotalShares RPC method.
// QueryMegavaultTotalSharesRequest is a request type for the
// MegavaultTotalShares RPC method.
message QueryMegavaultTotalSharesRequest {}

// QueryMegavaultTotalSharesResponse is a response type for the MegavaultTotalShares RPC method.
// QueryMegavaultTotalSharesResponse is a response type for the
// MegavaultTotalShares RPC method.
message QueryMegavaultTotalSharesResponse { NumShares total_shares = 1; }

// QueryMegavaultOwnerSharesRequest is a request type for the MegavaultOwnerShares RPC method.
// QueryMegavaultOwnerSharesRequest is a request type for the
// MegavaultOwnerShares RPC method.
message QueryMegavaultOwnerSharesRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 3;
}

// QueryMegavaultOwnerSharesResponse is a response type for the MegavaultOwnerShares RPC method.
// QueryMegavaultOwnerSharesResponse is a response type for the
// MegavaultOwnerShares RPC method.
message QueryMegavaultOwnerSharesResponse {
repeated OwnerShare owner_shares = 1;
cosmos.base.query.v1beta1.PageResponse pagination = 2;
Expand Down
12 changes: 8 additions & 4 deletions protocol/x/vault/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ac98dd

Please sign in to comment.