Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated params from x/vault params query #2387

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { VaultType, VaultTypeSDKType, VaultId, VaultIdSDKType } from "./vault";
import { PageRequest, PageRequestSDKType, PageResponse, PageResponseSDKType } from "../../cosmos/base/query/v1beta1/pagination";
import { NumShares, NumSharesSDKType, ShareUnlock, ShareUnlockSDKType, OwnerShare, OwnerShareSDKType } from "./share";
import { Params, ParamsSDKType, QuotingParams, QuotingParamsSDKType, OperatorParams, OperatorParamsSDKType, VaultParams, VaultParamsSDKType } from "./params";
import { QuotingParams, QuotingParamsSDKType, OperatorParams, OperatorParamsSDKType, VaultParams, VaultParamsSDKType } from "./params";
import { SubaccountId, SubaccountIdSDKType } from "../subaccounts/subaccount";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial } from "../../helpers";
Expand All @@ -14,20 +14,12 @@ export interface QueryParamsRequestSDKType {}
/** QueryParamsResponse is a response type for the Params RPC method. */

export interface QueryParamsResponse {
/** Deprecated since v6.x in favor of default_quoting_params. */

/** @deprecated */
params?: Params;
defaultQuotingParams?: QuotingParams;
operatorParams?: OperatorParams;
}
/** QueryParamsResponse is a response type for the Params RPC method. */

export interface QueryParamsResponseSDKType {
/** Deprecated since v6.x in favor of default_quoting_params. */

/** @deprecated */
params?: ParamsSDKType;
default_quoting_params?: QuotingParamsSDKType;
operator_params?: OperatorParamsSDKType;
}
Expand Down Expand Up @@ -344,24 +336,19 @@ export const QueryParamsRequest = {

function createBaseQueryParamsResponse(): QueryParamsResponse {
return {
params: undefined,
defaultQuotingParams: undefined,
operatorParams: undefined
};
}

export const QueryParamsResponse = {
encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.params !== undefined) {
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
}

if (message.defaultQuotingParams !== undefined) {
QuotingParams.encode(message.defaultQuotingParams, writer.uint32(18).fork()).ldelim();
QuotingParams.encode(message.defaultQuotingParams, writer.uint32(10).fork()).ldelim();
}

if (message.operatorParams !== undefined) {
OperatorParams.encode(message.operatorParams, writer.uint32(26).fork()).ldelim();
OperatorParams.encode(message.operatorParams, writer.uint32(18).fork()).ldelim();
}

return writer;
Expand All @@ -377,14 +364,10 @@ export const QueryParamsResponse = {

switch (tag >>> 3) {
case 1:
message.params = Params.decode(reader, reader.uint32());
break;

case 2:
message.defaultQuotingParams = QuotingParams.decode(reader, reader.uint32());
break;

case 3:
case 2:
message.operatorParams = OperatorParams.decode(reader, reader.uint32());
break;

Expand All @@ -399,7 +382,6 @@ export const QueryParamsResponse = {

fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse {
const message = createBaseQueryParamsResponse();
message.params = object.params !== undefined && object.params !== null ? Params.fromPartial(object.params) : undefined;
message.defaultQuotingParams = object.defaultQuotingParams !== undefined && object.defaultQuotingParams !== null ? QuotingParams.fromPartial(object.defaultQuotingParams) : undefined;
message.operatorParams = object.operatorParams !== undefined && object.operatorParams !== null ? OperatorParams.fromPartial(object.operatorParams) : undefined;
return message;
Expand Down
6 changes: 2 additions & 4 deletions proto/dydxprotocol/vault/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ message QueryParamsRequest {}

// QueryParamsResponse is a response type for the Params RPC method.
message QueryParamsResponse {
// Deprecated since v6.x in favor of default_quoting_params.
Params params = 1 [ (gogoproto.nullable) = false, deprecated = true ];
QuotingParams default_quoting_params = 2 [ (gogoproto.nullable) = false ];
OperatorParams operator_params = 3 [ (gogoproto.nullable) = false ];
QuotingParams default_quoting_params = 1 [ (gogoproto.nullable) = false ];
OperatorParams operator_params = 2 [ (gogoproto.nullable) = false ];
}

// QueryVaultRequest is a request type for the Vault RPC method.
Expand Down
Loading
Loading