diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts index 3b538b90b1..8f224f5dd2 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts @@ -60,114 +60,115 @@ import * as _63 from "./indexer/redis/redis_order"; import * as _64 from "./indexer/shared/removal_reason"; import * as _65 from "./indexer/socks/messages"; import * as _66 from "./listing/genesis"; -import * as _67 from "./listing/query"; -import * as _68 from "./listing/tx"; -import * as _69 from "./perpetuals/genesis"; -import * as _70 from "./perpetuals/params"; -import * as _71 from "./perpetuals/perpetual"; -import * as _72 from "./perpetuals/query"; -import * as _73 from "./perpetuals/tx"; -import * as _74 from "./prices/genesis"; -import * as _75 from "./prices/market_param"; -import * as _76 from "./prices/market_price"; -import * as _77 from "./prices/query"; -import * as _78 from "./prices/tx"; -import * as _79 from "./ratelimit/capacity"; -import * as _80 from "./ratelimit/genesis"; -import * as _81 from "./ratelimit/limit_params"; -import * as _82 from "./ratelimit/pending_send_packet"; -import * as _83 from "./ratelimit/query"; -import * as _84 from "./ratelimit/tx"; -import * as _85 from "./revshare/genesis"; -import * as _86 from "./revshare/params"; -import * as _87 from "./revshare/query"; -import * as _88 from "./revshare/revshare"; -import * as _89 from "./revshare/tx"; -import * as _90 from "./rewards/genesis"; -import * as _91 from "./rewards/params"; -import * as _92 from "./rewards/query"; -import * as _93 from "./rewards/reward_share"; -import * as _94 from "./rewards/tx"; -import * as _95 from "./sending/genesis"; -import * as _96 from "./sending/query"; -import * as _97 from "./sending/transfer"; -import * as _98 from "./sending/tx"; -import * as _99 from "./stats/genesis"; -import * as _100 from "./stats/params"; -import * as _101 from "./stats/query"; -import * as _102 from "./stats/stats"; -import * as _103 from "./stats/tx"; -import * as _104 from "./subaccounts/asset_position"; -import * as _105 from "./subaccounts/genesis"; -import * as _106 from "./subaccounts/perpetual_position"; -import * as _107 from "./subaccounts/query"; -import * as _108 from "./subaccounts/streaming"; -import * as _109 from "./subaccounts/subaccount"; -import * as _110 from "./vault/genesis"; -import * as _111 from "./vault/params"; -import * as _112 from "./vault/query"; -import * as _113 from "./vault/share"; -import * as _114 from "./vault/tx"; -import * as _115 from "./vault/vault"; -import * as _116 from "./vest/genesis"; -import * as _117 from "./vest/query"; -import * as _118 from "./vest/tx"; -import * as _119 from "./vest/vest_entry"; -import * as _127 from "./assets/query.lcd"; -import * as _128 from "./blocktime/query.lcd"; -import * as _129 from "./bridge/query.lcd"; -import * as _130 from "./clob/query.lcd"; -import * as _131 from "./delaymsg/query.lcd"; -import * as _132 from "./epochs/query.lcd"; -import * as _133 from "./feetiers/query.lcd"; -import * as _134 from "./perpetuals/query.lcd"; -import * as _135 from "./prices/query.lcd"; -import * as _136 from "./ratelimit/query.lcd"; -import * as _137 from "./revshare/query.lcd"; -import * as _138 from "./rewards/query.lcd"; -import * as _139 from "./stats/query.lcd"; -import * as _140 from "./subaccounts/query.lcd"; -import * as _141 from "./vault/query.lcd"; -import * as _142 from "./vest/query.lcd"; -import * as _143 from "./affiliates/query.rpc.Query"; -import * as _144 from "./assets/query.rpc.Query"; -import * as _145 from "./blocktime/query.rpc.Query"; -import * as _146 from "./bridge/query.rpc.Query"; -import * as _147 from "./clob/query.rpc.Query"; -import * as _148 from "./delaymsg/query.rpc.Query"; -import * as _149 from "./epochs/query.rpc.Query"; -import * as _150 from "./feetiers/query.rpc.Query"; -import * as _151 from "./govplus/query.rpc.Query"; -import * as _152 from "./listing/query.rpc.Query"; -import * as _153 from "./perpetuals/query.rpc.Query"; -import * as _154 from "./prices/query.rpc.Query"; -import * as _155 from "./ratelimit/query.rpc.Query"; -import * as _156 from "./revshare/query.rpc.Query"; -import * as _157 from "./rewards/query.rpc.Query"; -import * as _158 from "./sending/query.rpc.Query"; -import * as _159 from "./stats/query.rpc.Query"; -import * as _160 from "./subaccounts/query.rpc.Query"; -import * as _161 from "./vault/query.rpc.Query"; -import * as _162 from "./vest/query.rpc.Query"; -import * as _163 from "./blocktime/tx.rpc.msg"; -import * as _164 from "./bridge/tx.rpc.msg"; -import * as _165 from "./clob/tx.rpc.msg"; -import * as _166 from "./delaymsg/tx.rpc.msg"; -import * as _167 from "./feetiers/tx.rpc.msg"; -import * as _168 from "./govplus/tx.rpc.msg"; -import * as _169 from "./listing/tx.rpc.msg"; -import * as _170 from "./perpetuals/tx.rpc.msg"; -import * as _171 from "./prices/tx.rpc.msg"; -import * as _172 from "./ratelimit/tx.rpc.msg"; -import * as _173 from "./revshare/tx.rpc.msg"; -import * as _174 from "./rewards/tx.rpc.msg"; -import * as _175 from "./sending/tx.rpc.msg"; -import * as _176 from "./stats/tx.rpc.msg"; -import * as _177 from "./vault/tx.rpc.msg"; -import * as _178 from "./vest/tx.rpc.msg"; -import * as _179 from "./lcd"; -import * as _180 from "./rpc.query"; -import * as _181 from "./rpc.tx"; +import * as _67 from "./listing/params"; +import * as _68 from "./listing/query"; +import * as _69 from "./listing/tx"; +import * as _70 from "./perpetuals/genesis"; +import * as _71 from "./perpetuals/params"; +import * as _72 from "./perpetuals/perpetual"; +import * as _73 from "./perpetuals/query"; +import * as _74 from "./perpetuals/tx"; +import * as _75 from "./prices/genesis"; +import * as _76 from "./prices/market_param"; +import * as _77 from "./prices/market_price"; +import * as _78 from "./prices/query"; +import * as _79 from "./prices/tx"; +import * as _80 from "./ratelimit/capacity"; +import * as _81 from "./ratelimit/genesis"; +import * as _82 from "./ratelimit/limit_params"; +import * as _83 from "./ratelimit/pending_send_packet"; +import * as _84 from "./ratelimit/query"; +import * as _85 from "./ratelimit/tx"; +import * as _86 from "./revshare/genesis"; +import * as _87 from "./revshare/params"; +import * as _88 from "./revshare/query"; +import * as _89 from "./revshare/revshare"; +import * as _90 from "./revshare/tx"; +import * as _91 from "./rewards/genesis"; +import * as _92 from "./rewards/params"; +import * as _93 from "./rewards/query"; +import * as _94 from "./rewards/reward_share"; +import * as _95 from "./rewards/tx"; +import * as _96 from "./sending/genesis"; +import * as _97 from "./sending/query"; +import * as _98 from "./sending/transfer"; +import * as _99 from "./sending/tx"; +import * as _100 from "./stats/genesis"; +import * as _101 from "./stats/params"; +import * as _102 from "./stats/query"; +import * as _103 from "./stats/stats"; +import * as _104 from "./stats/tx"; +import * as _105 from "./subaccounts/asset_position"; +import * as _106 from "./subaccounts/genesis"; +import * as _107 from "./subaccounts/perpetual_position"; +import * as _108 from "./subaccounts/query"; +import * as _109 from "./subaccounts/streaming"; +import * as _110 from "./subaccounts/subaccount"; +import * as _111 from "./vault/genesis"; +import * as _112 from "./vault/params"; +import * as _113 from "./vault/query"; +import * as _114 from "./vault/share"; +import * as _115 from "./vault/tx"; +import * as _116 from "./vault/vault"; +import * as _117 from "./vest/genesis"; +import * as _118 from "./vest/query"; +import * as _119 from "./vest/tx"; +import * as _120 from "./vest/vest_entry"; +import * as _128 from "./assets/query.lcd"; +import * as _129 from "./blocktime/query.lcd"; +import * as _130 from "./bridge/query.lcd"; +import * as _131 from "./clob/query.lcd"; +import * as _132 from "./delaymsg/query.lcd"; +import * as _133 from "./epochs/query.lcd"; +import * as _134 from "./feetiers/query.lcd"; +import * as _135 from "./perpetuals/query.lcd"; +import * as _136 from "./prices/query.lcd"; +import * as _137 from "./ratelimit/query.lcd"; +import * as _138 from "./revshare/query.lcd"; +import * as _139 from "./rewards/query.lcd"; +import * as _140 from "./stats/query.lcd"; +import * as _141 from "./subaccounts/query.lcd"; +import * as _142 from "./vault/query.lcd"; +import * as _143 from "./vest/query.lcd"; +import * as _144 from "./affiliates/query.rpc.Query"; +import * as _145 from "./assets/query.rpc.Query"; +import * as _146 from "./blocktime/query.rpc.Query"; +import * as _147 from "./bridge/query.rpc.Query"; +import * as _148 from "./clob/query.rpc.Query"; +import * as _149 from "./delaymsg/query.rpc.Query"; +import * as _150 from "./epochs/query.rpc.Query"; +import * as _151 from "./feetiers/query.rpc.Query"; +import * as _152 from "./govplus/query.rpc.Query"; +import * as _153 from "./listing/query.rpc.Query"; +import * as _154 from "./perpetuals/query.rpc.Query"; +import * as _155 from "./prices/query.rpc.Query"; +import * as _156 from "./ratelimit/query.rpc.Query"; +import * as _157 from "./revshare/query.rpc.Query"; +import * as _158 from "./rewards/query.rpc.Query"; +import * as _159 from "./sending/query.rpc.Query"; +import * as _160 from "./stats/query.rpc.Query"; +import * as _161 from "./subaccounts/query.rpc.Query"; +import * as _162 from "./vault/query.rpc.Query"; +import * as _163 from "./vest/query.rpc.Query"; +import * as _164 from "./blocktime/tx.rpc.msg"; +import * as _165 from "./bridge/tx.rpc.msg"; +import * as _166 from "./clob/tx.rpc.msg"; +import * as _167 from "./delaymsg/tx.rpc.msg"; +import * as _168 from "./feetiers/tx.rpc.msg"; +import * as _169 from "./govplus/tx.rpc.msg"; +import * as _170 from "./listing/tx.rpc.msg"; +import * as _171 from "./perpetuals/tx.rpc.msg"; +import * as _172 from "./prices/tx.rpc.msg"; +import * as _173 from "./ratelimit/tx.rpc.msg"; +import * as _174 from "./revshare/tx.rpc.msg"; +import * as _175 from "./rewards/tx.rpc.msg"; +import * as _176 from "./sending/tx.rpc.msg"; +import * as _177 from "./stats/tx.rpc.msg"; +import * as _178 from "./vault/tx.rpc.msg"; +import * as _179 from "./vest/tx.rpc.msg"; +import * as _180 from "./lcd"; +import * as _181 from "./rpc.query"; +import * as _182 from "./rpc.tx"; export namespace dydxprotocol { export const accountplus = { ..._5, ..._6 @@ -175,23 +176,23 @@ export namespace dydxprotocol { export const affiliates = { ..._7, ..._8, ..._9, - ..._143 + ..._144 }; export const assets = { ..._10, ..._11, ..._12, ..._13, - ..._127, - ..._144 + ..._128, + ..._145 }; export const blocktime = { ..._14, ..._15, ..._16, ..._17, ..._18, - ..._128, - ..._145, - ..._163 + ..._129, + ..._146, + ..._164 }; export const bridge = { ..._19, ..._20, @@ -199,9 +200,9 @@ export namespace dydxprotocol { ..._22, ..._23, ..._24, - ..._129, - ..._146, - ..._164 + ..._130, + ..._147, + ..._165 }; export const clob = { ..._25, ..._26, @@ -217,9 +218,9 @@ export namespace dydxprotocol { ..._36, ..._37, ..._38, - ..._130, - ..._147, - ..._165 + ..._131, + ..._148, + ..._166 }; export namespace daemons { export const bridge = { ..._39 @@ -234,29 +235,29 @@ export namespace dydxprotocol { ..._44, ..._45, ..._46, - ..._131, - ..._148, - ..._166 + ..._132, + ..._149, + ..._167 }; export const epochs = { ..._47, ..._48, ..._49, - ..._132, - ..._149 + ..._133, + ..._150 }; export const feetiers = { ..._50, ..._51, ..._52, ..._53, - ..._133, - ..._150, - ..._167 + ..._134, + ..._151, + ..._168 }; export const govplus = { ..._54, ..._55, ..._56, - ..._151, - ..._168 + ..._152, + ..._169 }; export namespace indexer { export const events = { ..._57 @@ -281,100 +282,101 @@ export namespace dydxprotocol { export const listing = { ..._66, ..._67, ..._68, - ..._152, - ..._169 + ..._69, + ..._153, + ..._170 }; - export const perpetuals = { ..._69, - ..._70, + export const perpetuals = { ..._70, ..._71, ..._72, ..._73, - ..._134, - ..._153, - ..._170 + ..._74, + ..._135, + ..._154, + ..._171 }; - export const prices = { ..._74, - ..._75, + export const prices = { ..._75, ..._76, ..._77, ..._78, - ..._135, - ..._154, - ..._171 + ..._79, + ..._136, + ..._155, + ..._172 }; - export const ratelimit = { ..._79, - ..._80, + export const ratelimit = { ..._80, ..._81, ..._82, ..._83, ..._84, - ..._136, - ..._155, - ..._172 + ..._85, + ..._137, + ..._156, + ..._173 }; - export const revshare = { ..._85, - ..._86, + export const revshare = { ..._86, ..._87, ..._88, ..._89, - ..._137, - ..._156, - ..._173 + ..._90, + ..._138, + ..._157, + ..._174 }; - export const rewards = { ..._90, - ..._91, + export const rewards = { ..._91, ..._92, ..._93, ..._94, - ..._138, - ..._157, - ..._174 + ..._95, + ..._139, + ..._158, + ..._175 }; - export const sending = { ..._95, - ..._96, + export const sending = { ..._96, ..._97, ..._98, - ..._158, - ..._175 + ..._99, + ..._159, + ..._176 }; - export const stats = { ..._99, - ..._100, + export const stats = { ..._100, ..._101, ..._102, ..._103, - ..._139, - ..._159, - ..._176 + ..._104, + ..._140, + ..._160, + ..._177 }; - export const subaccounts = { ..._104, - ..._105, + export const subaccounts = { ..._105, ..._106, ..._107, ..._108, ..._109, - ..._140, - ..._160 + ..._110, + ..._141, + ..._161 }; - export const vault = { ..._110, - ..._111, + export const vault = { ..._111, ..._112, ..._113, ..._114, ..._115, - ..._141, - ..._161, - ..._177 - }; - export const vest = { ..._116, - ..._117, - ..._118, - ..._119, + ..._116, ..._142, ..._162, ..._178 }; - export const ClientFactory = { ..._179, - ..._180, - ..._181 + export const vest = { ..._117, + ..._118, + ..._119, + ..._120, + ..._143, + ..._163, + ..._179 + }; + export const ClientFactory = { ..._180, + ..._181, + ..._182 }; } \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/params.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/params.ts new file mode 100644 index 0000000000..910042afe9 --- /dev/null +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/params.ts @@ -0,0 +1,91 @@ +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial } from "../../helpers"; +/** ListingVaultDepositParams represents the params for PML megavault deposits */ + +export interface ListingVaultDepositParams { + /** Amount that will be deposited into the new market vault */ + newVaultDepositAmount: Uint8Array; + /** Amount deposited into the main vault */ + + mainVaultDepositAmount: Uint8Array; + /** Lockup period for this deposit */ + + numBlocksToLockShares: number; +} +/** ListingVaultDepositParams represents the params for PML megavault deposits */ + +export interface ListingVaultDepositParamsSDKType { + /** Amount that will be deposited into the new market vault */ + new_vault_deposit_amount: Uint8Array; + /** Amount deposited into the main vault */ + + main_vault_deposit_amount: Uint8Array; + /** Lockup period for this deposit */ + + num_blocks_to_lock_shares: number; +} + +function createBaseListingVaultDepositParams(): ListingVaultDepositParams { + return { + newVaultDepositAmount: new Uint8Array(), + mainVaultDepositAmount: new Uint8Array(), + numBlocksToLockShares: 0 + }; +} + +export const ListingVaultDepositParams = { + encode(message: ListingVaultDepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.newVaultDepositAmount.length !== 0) { + writer.uint32(10).bytes(message.newVaultDepositAmount); + } + + if (message.mainVaultDepositAmount.length !== 0) { + writer.uint32(18).bytes(message.mainVaultDepositAmount); + } + + if (message.numBlocksToLockShares !== 0) { + writer.uint32(24).uint32(message.numBlocksToLockShares); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ListingVaultDepositParams { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseListingVaultDepositParams(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.newVaultDepositAmount = reader.bytes(); + break; + + case 2: + message.mainVaultDepositAmount = reader.bytes(); + break; + + case 3: + message.numBlocksToLockShares = reader.uint32(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): ListingVaultDepositParams { + const message = createBaseListingVaultDepositParams(); + message.newVaultDepositAmount = object.newVaultDepositAmount ?? new Uint8Array(); + message.mainVaultDepositAmount = object.mainVaultDepositAmount ?? new Uint8Array(); + message.numBlocksToLockShares = object.numBlocksToLockShares ?? 0; + return message; + } + +}; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts index c9e917823d..da0efcc04f 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/query.ts @@ -1,3 +1,4 @@ +import { ListingVaultDepositParams, ListingVaultDepositParamsSDKType } from "./params"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial } from "../../helpers"; /** Queries for the hard cap on listed markets */ @@ -18,6 +19,22 @@ export interface QueryMarketsHardCapResponseSDKType { /** Response type indicating the hard cap on listed markets */ hard_cap: number; } +/** Queries the listing vault deposit params */ + +export interface QueryListingVaultDepositParams {} +/** Queries the listing vault deposit params */ + +export interface QueryListingVaultDepositParamsSDKType {} +/** Response type for QueryListingVaultDepositParams */ + +export interface QueryListingVaultDepositParamsResponse { + params?: ListingVaultDepositParams; +} +/** Response type for QueryListingVaultDepositParams */ + +export interface QueryListingVaultDepositParamsResponseSDKType { + params?: ListingVaultDepositParamsSDKType; +} function createBaseQueryMarketsHardCap(): QueryMarketsHardCap { return {}; @@ -96,4 +113,83 @@ export const QueryMarketsHardCapResponse = { return message; } +}; + +function createBaseQueryListingVaultDepositParams(): QueryListingVaultDepositParams { + return {}; +} + +export const QueryListingVaultDepositParams = { + encode(_: QueryListingVaultDepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryListingVaultDepositParams { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryListingVaultDepositParams(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(_: DeepPartial): QueryListingVaultDepositParams { + const message = createBaseQueryListingVaultDepositParams(); + return message; + } + +}; + +function createBaseQueryListingVaultDepositParamsResponse(): QueryListingVaultDepositParamsResponse { + return { + params: undefined + }; +} + +export const QueryListingVaultDepositParamsResponse = { + encode(message: QueryListingVaultDepositParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.params !== undefined) { + ListingVaultDepositParams.encode(message.params, writer.uint32(10).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): QueryListingVaultDepositParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseQueryListingVaultDepositParamsResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.params = ListingVaultDepositParams.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): QueryListingVaultDepositParamsResponse { + const message = createBaseQueryListingVaultDepositParamsResponse(); + message.params = object.params !== undefined && object.params !== null ? ListingVaultDepositParams.fromPartial(object.params) : undefined; + return message; + } + }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts index 1a2a52f3fa..170cf4f3bf 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.rpc.msg.ts @@ -1,6 +1,6 @@ import { Rpc } from "../../helpers"; import * as _m0 from "protobufjs/minimal"; -import { MsgSetMarketsHardCap, MsgSetMarketsHardCapResponse, MsgCreateMarketPermissionless, MsgCreateMarketPermissionlessResponse } from "./tx"; +import { MsgSetMarketsHardCap, MsgSetMarketsHardCapResponse, MsgCreateMarketPermissionless, MsgCreateMarketPermissionlessResponse, MsgSetListingVaultDepositParams, MsgSetListingVaultDepositParamsResponse } from "./tx"; /** Msg defines the Msg service. */ export interface Msg { @@ -9,6 +9,9 @@ export interface Msg { /** CreateMarketPermissionless creates a new market without going through x/gov */ createMarketPermissionless(request: MsgCreateMarketPermissionless): Promise; + /** SetListingVaultDepositParams sets PML megavault deposit params */ + + setListingVaultDepositParams(request: MsgSetListingVaultDepositParams): Promise; } export class MsgClientImpl implements Msg { private readonly rpc: Rpc; @@ -17,6 +20,7 @@ export class MsgClientImpl implements Msg { this.rpc = rpc; this.setMarketsHardCap = this.setMarketsHardCap.bind(this); this.createMarketPermissionless = this.createMarketPermissionless.bind(this); + this.setListingVaultDepositParams = this.setListingVaultDepositParams.bind(this); } setMarketsHardCap(request: MsgSetMarketsHardCap): Promise { @@ -31,4 +35,10 @@ export class MsgClientImpl implements Msg { return promise.then(data => MsgCreateMarketPermissionlessResponse.decode(new _m0.Reader(data))); } + setListingVaultDepositParams(request: MsgSetListingVaultDepositParams): Promise { + const data = MsgSetListingVaultDepositParams.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.listing.Msg", "SetListingVaultDepositParams", data); + return promise.then(data => MsgSetListingVaultDepositParamsResponse.decode(new _m0.Reader(data))); + } + } \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts index f81df0f61a..a9671092af 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/listing/tx.ts @@ -1,4 +1,5 @@ import { SubaccountId, SubaccountIdSDKType } from "../subaccounts/subaccount"; +import { ListingVaultDepositParams, ListingVaultDepositParamsSDKType } from "./params"; import * as _m0 from "protobufjs/minimal"; import { DeepPartial } from "../../helpers"; /** @@ -31,7 +32,7 @@ export interface MsgSetMarketsHardCapResponse {} export interface MsgSetMarketsHardCapResponseSDKType {} /** * MsgCreateMarketPermissionless is a message used to create new markets without - * // going through x/gov + * going through x/gov */ export interface MsgCreateMarketPermissionless { @@ -46,7 +47,7 @@ export interface MsgCreateMarketPermissionless { } /** * MsgCreateMarketPermissionless is a message used to create new markets without - * // going through x/gov + * going through x/gov */ export interface MsgCreateMarketPermissionlessSDKType { @@ -71,6 +72,40 @@ export interface MsgCreateMarketPermissionlessResponse {} */ export interface MsgCreateMarketPermissionlessResponseSDKType {} +/** + * MsgSetListingVaultDepositParams is a message used to set PML megavault + * deposit params + */ + +export interface MsgSetListingVaultDepositParams { + authority: string; + /** Params which define the vault deposit for market listing */ + + params?: ListingVaultDepositParams; +} +/** + * MsgSetListingVaultDepositParams is a message used to set PML megavault + * deposit params + */ + +export interface MsgSetListingVaultDepositParamsSDKType { + authority: string; + /** Params which define the vault deposit for market listing */ + + params?: ListingVaultDepositParamsSDKType; +} +/** + * MsgSetListingVaultDepositParamsResponse defines the + * MsgSetListingVaultDepositParams response + */ + +export interface MsgSetListingVaultDepositParamsResponse {} +/** + * MsgSetListingVaultDepositParamsResponse defines the + * MsgSetListingVaultDepositParams response + */ + +export interface MsgSetListingVaultDepositParamsResponseSDKType {} function createBaseMsgSetMarketsHardCap(): MsgSetMarketsHardCap { return { @@ -258,4 +293,93 @@ export const MsgCreateMarketPermissionlessResponse = { return message; } +}; + +function createBaseMsgSetListingVaultDepositParams(): MsgSetListingVaultDepositParams { + return { + authority: "", + params: undefined + }; +} + +export const MsgSetListingVaultDepositParams = { + encode(message: MsgSetListingVaultDepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + + if (message.params !== undefined) { + ListingVaultDepositParams.encode(message.params, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSetListingVaultDepositParams { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSetListingVaultDepositParams(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + + case 2: + message.params = ListingVaultDepositParams.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): MsgSetListingVaultDepositParams { + const message = createBaseMsgSetListingVaultDepositParams(); + message.authority = object.authority ?? ""; + message.params = object.params !== undefined && object.params !== null ? ListingVaultDepositParams.fromPartial(object.params) : undefined; + return message; + } + +}; + +function createBaseMsgSetListingVaultDepositParamsResponse(): MsgSetListingVaultDepositParamsResponse { + return {}; +} + +export const MsgSetListingVaultDepositParamsResponse = { + encode(_: MsgSetListingVaultDepositParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSetListingVaultDepositParamsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgSetListingVaultDepositParamsResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(_: DeepPartial): MsgSetListingVaultDepositParamsResponse { + const message = createBaseMsgSetListingVaultDepositParamsResponse(); + return message; + } + }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts b/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts index 3901c34d08..0acccb5b70 100644 --- a/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts @@ -1,3 +1,3 @@ -import * as _120 from "./gogo"; -export const gogoproto = { ..._120 +import * as _121 from "./gogo"; +export const gogoproto = { ..._121 }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/google/bundle.ts b/indexer/packages/v4-protos/src/codegen/google/bundle.ts index b110052341..e82b3d8290 100644 --- a/indexer/packages/v4-protos/src/codegen/google/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/google/bundle.ts @@ -1,16 +1,16 @@ -import * as _121 from "./api/annotations"; -import * as _122 from "./api/http"; -import * as _123 from "./protobuf/descriptor"; -import * as _124 from "./protobuf/duration"; -import * as _125 from "./protobuf/timestamp"; -import * as _126 from "./protobuf/any"; +import * as _122 from "./api/annotations"; +import * as _123 from "./api/http"; +import * as _124 from "./protobuf/descriptor"; +import * as _125 from "./protobuf/duration"; +import * as _126 from "./protobuf/timestamp"; +import * as _127 from "./protobuf/any"; export namespace google { - export const api = { ..._121, - ..._122 + export const api = { ..._122, + ..._123 }; - export const protobuf = { ..._123, - ..._124, + export const protobuf = { ..._124, ..._125, - ..._126 + ..._126, + ..._127 }; } \ No newline at end of file diff --git a/proto/dydxprotocol/listing/params.proto b/proto/dydxprotocol/listing/params.proto new file mode 100644 index 0000000000..d467d12626 --- /dev/null +++ b/proto/dydxprotocol/listing/params.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package dydxprotocol.listing; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/listing/types"; + +// ListingVaultDepositParams represents the params for PML megavault deposits +message ListingVaultDepositParams { + // Amount that will be deposited into the new market vault + bytes new_vault_deposit_amount = 1 [ + (gogoproto.customtype) = + "github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt", + (gogoproto.nullable) = false + ]; + + // Amount deposited into the main vault + bytes main_vault_deposit_amount = 2 [ + (gogoproto.customtype) = + "github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt", + (gogoproto.nullable) = false + ]; + + // Lockup period for this deposit + uint32 num_blocks_to_lock_shares = 3; +} \ No newline at end of file diff --git a/proto/dydxprotocol/listing/query.proto b/proto/dydxprotocol/listing/query.proto index 1b4554f9c4..f1e66cc5ca 100644 --- a/proto/dydxprotocol/listing/query.proto +++ b/proto/dydxprotocol/listing/query.proto @@ -1,6 +1,9 @@ syntax = "proto3"; package dydxprotocol.listing; +import "gogoproto/gogo.proto"; +import "dydxprotocol/listing/params.proto"; + option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/listing/types"; // Query defines the gRPC querier service. @@ -14,3 +17,11 @@ message QueryMarketsHardCap {} // Response type indicating the hard cap on listed markets message QueryMarketsHardCapResponse { uint32 hard_cap = 1; } + +// Queries the listing vault deposit params +message QueryListingVaultDepositParams{} + +// Response type for QueryListingVaultDepositParams +message QueryListingVaultDepositParamsResponse { + ListingVaultDepositParams params = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/dydxprotocol/listing/tx.proto b/proto/dydxprotocol/listing/tx.proto index f625268e2e..572586e15e 100644 --- a/proto/dydxprotocol/listing/tx.proto +++ b/proto/dydxprotocol/listing/tx.proto @@ -5,6 +5,7 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; import "dydxprotocol/subaccounts/subaccount.proto"; +import "dydxprotocol/listing/params.proto"; option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/listing/types"; @@ -17,6 +18,10 @@ service Msg { // CreateMarketPermissionless creates a new market without going through x/gov rpc CreateMarketPermissionless(MsgCreateMarketPermissionless) returns (MsgCreateMarketPermissionlessResponse); + + // SetListingVaultDepositParams sets PML megavault deposit params + rpc SetListingVaultDepositParams(MsgSetListingVaultDepositParams) + returns (MsgSetListingVaultDepositParamsResponse); } // MsgSetMarketsHardCap is used to set a hard cap on the number of markets @@ -35,7 +40,7 @@ message MsgSetMarketsHardCap { message MsgSetMarketsHardCapResponse {} // MsgCreateMarketPermissionless is a message used to create new markets without -// // going through x/gov +// going through x/gov message MsgCreateMarketPermissionless { option (cosmos.msg.v1.signer) = "subaccount_id"; @@ -56,3 +61,19 @@ message MsgCreateMarketPermissionless { // MsgCreateMarketPermissionlessResponse defines the // MsgCreateMarketPermissionless response message MsgCreateMarketPermissionlessResponse {} + +// MsgSetListingVaultDepositParams is a message used to set PML megavault +// deposit params +message MsgSetListingVaultDepositParams { + // The address that controls the module (the gov module account). + option (cosmos.msg.v1.signer) = "authority"; + + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + + // Params which define the vault deposit for market listing + ListingVaultDepositParams params = 2 [ (gogoproto.nullable) = false ]; +} + +// MsgSetListingVaultDepositParamsResponse defines the +// MsgSetListingVaultDepositParams response +message MsgSetListingVaultDepositParamsResponse {} \ No newline at end of file diff --git a/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params.go b/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params.go new file mode 100644 index 0000000000..2c54d5eb8f --- /dev/null +++ b/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params.go @@ -0,0 +1,16 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" +) + +func (k Keeper) ListingVaultDepositParams( + ctx sdk.Context, + req *types.QueryListingVaultDepositParams, +) (*types.QueryListingVaultDepositParamsResponse, error) { + params := k.GetListingVaultDepositParams(ctx) + return &types.QueryListingVaultDepositParamsResponse{ + Params: params, + }, nil +} diff --git a/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params_test.go b/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params_test.go new file mode 100644 index 0000000000..05e661b3d6 --- /dev/null +++ b/protocol/x/listing/keeper/grpc_query_listing_vault_deposit_params_test.go @@ -0,0 +1,30 @@ +package keeper_test + +import ( + "math/big" + "testing" + + "github.com/dydxprotocol/v4-chain/protocol/dtypes" + testapp "github.com/dydxprotocol/v4-chain/protocol/testutil/app" + "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" + "github.com/stretchr/testify/require" +) + +func TestQueryListingVaultDepositParams(t *testing.T) { + tApp := testapp.NewTestAppBuilder(t).Build() + ctx := tApp.InitChain() + k := tApp.App.ListingKeeper + + params := types.ListingVaultDepositParams{ + NewVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(100_000_000)), + MainVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(0)), + NumBlocksToLockShares: 30 * 24 * 3600, // 30 days + } + + err := k.SetListingVaultDepositParams(ctx, params) + require.NoError(t, err) + + resp, err := k.ListingVaultDepositParams(ctx, &types.QueryListingVaultDepositParams{}) + require.NoError(t, err) + require.Equal(t, resp.Params, params) +} diff --git a/protocol/x/listing/keeper/listing.go b/protocol/x/listing/keeper/listing.go index bc10bed17a..dd6bead6a6 100644 --- a/protocol/x/listing/keeper/listing.go +++ b/protocol/x/listing/keeper/listing.go @@ -148,3 +148,24 @@ func (k Keeper) CreatePerpetual( return perpetual.GetId(), nil } + +// Function to set listing vault deposit params in module store +func (k Keeper) SetListingVaultDepositParams( + ctx sdk.Context, + params types.ListingVaultDepositParams, +) error { + store := ctx.KVStore(k.storeKey) + key := []byte(types.ListingVaultDepositParamsKey) + store.Set(key, k.cdc.MustMarshal(¶ms)) + return nil +} + +// Function to get listing vault deposit params from module store +func (k Keeper) GetListingVaultDepositParams( + ctx sdk.Context, +) (vaultDepositParams types.ListingVaultDepositParams) { + store := ctx.KVStore(k.storeKey) + b := store.Get([]byte(types.ListingVaultDepositParamsKey)) + k.cdc.MustUnmarshal(b, &vaultDepositParams) + return vaultDepositParams +} diff --git a/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params.go b/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params.go new file mode 100644 index 0000000000..db7b4e985f --- /dev/null +++ b/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params.go @@ -0,0 +1,34 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/dydxprotocol/v4-chain/protocol/lib" + "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" +) + +func (k msgServer) SetListingVaultDepositParams( + goCtx context.Context, + msg *types.MsgSetListingVaultDepositParams, +) (*types.MsgSetListingVaultDepositParamsResponse, error) { + ctx := lib.UnwrapSDKContext(goCtx, types.ModuleName) + + // Check if the sender has the authority to set the vault deposit params + if !k.HasAuthority(msg.Authority) { + return nil, errorsmod.Wrapf( + govtypes.ErrInvalidSigner, + "invalid authority %s", + msg.Authority, + ) + } + + // Set the vault deposit params for the listing + err := k.Keeper.SetListingVaultDepositParams(ctx, msg.Params) + if err != nil { + return nil, err + } + + return &types.MsgSetListingVaultDepositParamsResponse{}, nil +} diff --git a/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params_test.go b/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params_test.go new file mode 100644 index 0000000000..c10ebae110 --- /dev/null +++ b/protocol/x/listing/keeper/msg_set_listing_vault_deposit_params_test.go @@ -0,0 +1,74 @@ +package keeper_test + +import ( + "math/big" + "testing" + + "github.com/dydxprotocol/v4-chain/protocol/dtypes" + "github.com/dydxprotocol/v4-chain/protocol/lib" + testapp "github.com/dydxprotocol/v4-chain/protocol/testutil/app" + "github.com/dydxprotocol/v4-chain/protocol/testutil/constants" + "github.com/dydxprotocol/v4-chain/protocol/x/listing/keeper" + "github.com/dydxprotocol/v4-chain/protocol/x/listing/types" + "github.com/stretchr/testify/require" +) + +func TestSetListingVaultDepositParams(t *testing.T) { + tests := map[string]struct { + // Msg. + msg *types.MsgSetListingVaultDepositParams + // Expected error + expectedErr string + }{ + "Success - Set vault deposit params": { + msg: &types.MsgSetListingVaultDepositParams{ + Authority: lib.GovModuleAddress.String(), + Params: types.ListingVaultDepositParams{ + NewVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(100_000_000)), + MainVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(0)), + NumBlocksToLockShares: 30 * 24 * 3600, // 30 days + }, + }, + }, + "Failure - Invalid Authority": { + msg: &types.MsgSetListingVaultDepositParams{ + Authority: constants.AliceAccAddress.String(), + Params: types.ListingVaultDepositParams{ + NewVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(100_000_000)), + MainVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(0)), + NumBlocksToLockShares: 30 * 24 * 3600, // 30 days + }, + }, + expectedErr: "invalid authority", + }, + "Failure - Empty authority": { + msg: &types.MsgSetListingVaultDepositParams{ + Params: types.ListingVaultDepositParams{ + NewVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(100_000_000)), + MainVaultDepositAmount: dtypes.NewIntFromBigInt(big.NewInt(0)), + NumBlocksToLockShares: 30 * 24 * 3600, // 30 days + }, + }, + expectedErr: "invalid authority", + }, + } + + for name, tc := range tests { + t.Run( + name, func(t *testing.T) { + tApp := testapp.NewTestAppBuilder(t).Build() + ctx := tApp.InitChain() + k := tApp.App.ListingKeeper + ms := keeper.NewMsgServerImpl(k) + _, err := ms.SetListingVaultDepositParams(ctx, tc.msg) + if tc.expectedErr != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expectedErr) + } else { + params := k.GetListingVaultDepositParams(ctx) + require.Equal(t, tc.msg.Params, params) + } + }, + ) + } +} diff --git a/protocol/x/listing/types/keys.go b/protocol/x/listing/types/keys.go index 19e480890d..ecf1bfece8 100644 --- a/protocol/x/listing/types/keys.go +++ b/protocol/x/listing/types/keys.go @@ -13,4 +13,7 @@ const ( const ( // HardCapForMarketsKey is the key to retrieve the hard cap for listed markets. HardCapForMarketsKey = "HardCapForMarkets" + + // ListingVaultDepositParamsKey is the key to retrieve the listing vault deposit params. + ListingVaultDepositParamsKey = "ListingVaultDepositParams" ) diff --git a/protocol/x/listing/types/params.pb.go b/protocol/x/listing/types/params.pb.go new file mode 100644 index 0000000000..446ff63f31 --- /dev/null +++ b/protocol/x/listing/types/params.pb.go @@ -0,0 +1,406 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: dydxprotocol/listing/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_dydxprotocol_v4_chain_protocol_dtypes "github.com/dydxprotocol/v4-chain/protocol/dtypes" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListingVaultDepositParams represents the params for PML megavault deposits +type ListingVaultDepositParams struct { + // Amount that will be deposited into the new market vault + NewVaultDepositAmount github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,1,opt,name=new_vault_deposit_amount,json=newVaultDepositAmount,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"new_vault_deposit_amount"` + // Amount deposited into the main vault + MainVaultDepositAmount github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,2,opt,name=main_vault_deposit_amount,json=mainVaultDepositAmount,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"main_vault_deposit_amount"` + // Lockup period for this deposit + NumBlocksToLockShares uint32 `protobuf:"varint,3,opt,name=num_blocks_to_lock_shares,json=numBlocksToLockShares,proto3" json:"num_blocks_to_lock_shares,omitempty"` +} + +func (m *ListingVaultDepositParams) Reset() { *m = ListingVaultDepositParams{} } +func (m *ListingVaultDepositParams) String() string { return proto.CompactTextString(m) } +func (*ListingVaultDepositParams) ProtoMessage() {} +func (*ListingVaultDepositParams) Descriptor() ([]byte, []int) { + return fileDescriptor_051852a22a035387, []int{0} +} +func (m *ListingVaultDepositParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListingVaultDepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListingVaultDepositParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListingVaultDepositParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListingVaultDepositParams.Merge(m, src) +} +func (m *ListingVaultDepositParams) XXX_Size() int { + return m.Size() +} +func (m *ListingVaultDepositParams) XXX_DiscardUnknown() { + xxx_messageInfo_ListingVaultDepositParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ListingVaultDepositParams proto.InternalMessageInfo + +func (m *ListingVaultDepositParams) GetNumBlocksToLockShares() uint32 { + if m != nil { + return m.NumBlocksToLockShares + } + return 0 +} + +func init() { + proto.RegisterType((*ListingVaultDepositParams)(nil), "dydxprotocol.listing.ListingVaultDepositParams") +} + +func init() { proto.RegisterFile("dydxprotocol/listing/params.proto", fileDescriptor_051852a22a035387) } + +var fileDescriptor_051852a22a035387 = []byte{ + // 307 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0xa9, 0x4c, 0xa9, + 0x28, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0xcf, 0xc9, 0x2c, 0x2e, 0xc9, 0xcc, 0x4b, + 0xd7, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0xd6, 0x03, 0x8b, 0x0b, 0x89, 0x20, 0x2b, 0xd1, 0x83, + 0x2a, 0x91, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x8b, 0xea, 0x83, 0x58, 0x10, 0xb5, 0x4a, 0xf7, + 0x99, 0xb8, 0x24, 0x7d, 0x20, 0x2a, 0xc2, 0x12, 0x4b, 0x73, 0x4a, 0x5c, 0x52, 0x0b, 0xf2, 0x8b, + 0x33, 0x4b, 0x02, 0xc0, 0xe6, 0x09, 0x35, 0x32, 0x72, 0x49, 0xe4, 0xa5, 0x96, 0xc7, 0x97, 0x81, + 0xa4, 0xe2, 0x53, 0x20, 0x72, 0xf1, 0x89, 0xb9, 0xf9, 0xa5, 0x79, 0x25, 0x12, 0x8c, 0x0a, 0x8c, + 0x1a, 0x3c, 0x4e, 0x1e, 0x27, 0xee, 0xc9, 0x33, 0xdc, 0xba, 0x27, 0xef, 0x90, 0x9e, 0x59, 0x92, + 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x8f, 0xe2, 0xc4, 0x32, 0x13, 0xdd, 0xe4, 0x8c, 0xc4, + 0xcc, 0x3c, 0x7d, 0xb8, 0x48, 0x4a, 0x49, 0x65, 0x41, 0x6a, 0xb1, 0x5e, 0x70, 0x6a, 0x51, 0x66, + 0x62, 0x4e, 0x66, 0x55, 0x62, 0x52, 0x4e, 0xaa, 0x67, 0x5e, 0x49, 0x90, 0x68, 0x5e, 0x6a, 0x39, + 0xb2, 0x1b, 0x1c, 0xc1, 0xd6, 0x08, 0x35, 0x33, 0x72, 0x49, 0xe6, 0x26, 0x66, 0xe6, 0x61, 0x77, + 0x04, 0x13, 0x95, 0x1d, 0x21, 0x06, 0xb2, 0x0a, 0x8b, 0x2b, 0x2c, 0xb8, 0x24, 0xf3, 0x4a, 0x73, + 0xe3, 0x93, 0x72, 0xf2, 0x93, 0xb3, 0x8b, 0xe3, 0x4b, 0xf2, 0xe3, 0x41, 0x8c, 0xf8, 0xe2, 0x8c, + 0xc4, 0xa2, 0xd4, 0x62, 0x09, 0x66, 0x05, 0x46, 0x0d, 0xde, 0x20, 0xd1, 0xbc, 0xd2, 0x5c, 0x27, + 0xb0, 0x7c, 0x48, 0xbe, 0x4f, 0x7e, 0x72, 0x76, 0x30, 0x58, 0xd2, 0x29, 0xf8, 0xc4, 0x23, 0x39, + 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, + 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x2c, 0x89, 0x77, 0x6d, 0x05, 0x3c, 0xa6, 0xc1, 0xce, + 0x4e, 0x62, 0x03, 0xcb, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x77, 0x56, 0x05, 0x0e, + 0x02, 0x00, 0x00, +} + +func (m *ListingVaultDepositParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListingVaultDepositParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListingVaultDepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumBlocksToLockShares != 0 { + i = encodeVarintParams(dAtA, i, uint64(m.NumBlocksToLockShares)) + i-- + dAtA[i] = 0x18 + } + { + size := m.MainVaultDepositAmount.Size() + i -= size + if _, err := m.MainVaultDepositAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.NewVaultDepositAmount.Size() + i -= size + if _, err := m.NewVaultDepositAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListingVaultDepositParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.NewVaultDepositAmount.Size() + n += 1 + l + sovParams(uint64(l)) + l = m.MainVaultDepositAmount.Size() + n += 1 + l + sovParams(uint64(l)) + if m.NumBlocksToLockShares != 0 { + n += 1 + sovParams(uint64(m.NumBlocksToLockShares)) + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListingVaultDepositParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListingVaultDepositParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListingVaultDepositParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewVaultDepositAmount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.NewVaultDepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MainVaultDepositAmount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MainVaultDepositAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumBlocksToLockShares", wireType) + } + m.NumBlocksToLockShares = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumBlocksToLockShares |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protocol/x/listing/types/query.pb.go b/protocol/x/listing/types/query.pb.go index 3fbff0c909..0dc1bb9173 100644 --- a/protocol/x/listing/types/query.pb.go +++ b/protocol/x/listing/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" @@ -109,29 +110,120 @@ func (m *QueryMarketsHardCapResponse) GetHardCap() uint32 { return 0 } +// Queries the listing vault deposit params +type QueryListingVaultDepositParams struct { +} + +func (m *QueryListingVaultDepositParams) Reset() { *m = QueryListingVaultDepositParams{} } +func (m *QueryListingVaultDepositParams) String() string { return proto.CompactTextString(m) } +func (*QueryListingVaultDepositParams) ProtoMessage() {} +func (*QueryListingVaultDepositParams) Descriptor() ([]byte, []int) { + return fileDescriptor_6c3602ac8eedf7cc, []int{2} +} +func (m *QueryListingVaultDepositParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListingVaultDepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListingVaultDepositParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListingVaultDepositParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListingVaultDepositParams.Merge(m, src) +} +func (m *QueryListingVaultDepositParams) XXX_Size() int { + return m.Size() +} +func (m *QueryListingVaultDepositParams) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListingVaultDepositParams.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListingVaultDepositParams proto.InternalMessageInfo + +// Response type for QueryListingVaultDepositParams +type QueryListingVaultDepositParamsResponse struct { + Params ListingVaultDepositParams `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *QueryListingVaultDepositParamsResponse) Reset() { + *m = QueryListingVaultDepositParamsResponse{} +} +func (m *QueryListingVaultDepositParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryListingVaultDepositParamsResponse) ProtoMessage() {} +func (*QueryListingVaultDepositParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6c3602ac8eedf7cc, []int{3} +} +func (m *QueryListingVaultDepositParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryListingVaultDepositParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryListingVaultDepositParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryListingVaultDepositParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryListingVaultDepositParamsResponse.Merge(m, src) +} +func (m *QueryListingVaultDepositParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryListingVaultDepositParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryListingVaultDepositParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryListingVaultDepositParamsResponse proto.InternalMessageInfo + +func (m *QueryListingVaultDepositParamsResponse) GetParams() ListingVaultDepositParams { + if m != nil { + return m.Params + } + return ListingVaultDepositParams{} +} + func init() { proto.RegisterType((*QueryMarketsHardCap)(nil), "dydxprotocol.listing.QueryMarketsHardCap") proto.RegisterType((*QueryMarketsHardCapResponse)(nil), "dydxprotocol.listing.QueryMarketsHardCapResponse") + proto.RegisterType((*QueryListingVaultDepositParams)(nil), "dydxprotocol.listing.QueryListingVaultDepositParams") + proto.RegisterType((*QueryListingVaultDepositParamsResponse)(nil), "dydxprotocol.listing.QueryListingVaultDepositParamsResponse") } func init() { proto.RegisterFile("dydxprotocol/listing/query.proto", fileDescriptor_6c3602ac8eedf7cc) } var fileDescriptor_6c3602ac8eedf7cc = []byte{ - // 215 bytes of a gzipped FileDescriptorProto + // 297 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0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22, 0x15, 0xf0, 0xa0, 0x2b, - 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xcb, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, - 0xde, 0xd9, 0xa5, 0x5f, 0x01, 0x00, 0x00, + 0x90, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x8b, 0xea, 0x83, 0x58, 0x10, 0xb5, 0x52, 0x8a, 0x58, + 0x4d, 0x2b, 0x48, 0x2c, 0x4a, 0xcc, 0x2d, 0x86, 0x28, 0x51, 0x12, 0xe5, 0x12, 0x0e, 0x04, 0x99, + 0xee, 0x9b, 0x58, 0x94, 0x9d, 0x5a, 0x52, 0xec, 0x91, 0x58, 0x94, 0xe2, 0x9c, 0x58, 0xa0, 0x64, + 0xc1, 0x25, 0x8d, 0x45, 0x38, 0x28, 0xb5, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0x48, 0x92, 0x8b, + 0x23, 0x23, 0xb1, 0x28, 0x25, 0x3e, 0x39, 0xb1, 0x40, 0x82, 0x51, 0x81, 0x51, 0x83, 0x37, 0x88, + 0x3d, 0x03, 0xaa, 0x53, 0x81, 0x4b, 0x0e, 0xac, 0xd3, 0x07, 0x62, 0x5b, 0x58, 0x62, 0x69, 0x4e, + 0x89, 0x4b, 0x6a, 0x41, 0x7e, 0x71, 0x66, 0x49, 0x00, 0xd8, 0x62, 0xa5, 0x72, 0x2e, 0x35, 0xfc, + 0x2a, 0xe0, 0xd6, 0xf8, 0x72, 0xb1, 0x41, 0x1c, 0x0b, 0xb6, 0x84, 0xdb, 0x48, 0x5f, 0x0f, 0x9b, + 0xe7, 0xf5, 0x70, 0x1a, 0xe4, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 0x10, 0xd4, 0x10, 0xa3, 0x72, + 0x2e, 0x56, 0xb0, 0xc5, 0x42, 0x79, 0x5c, 0x7c, 0xa8, 0x1e, 0x13, 0xd2, 0xc4, 0x6e, 0x32, 0x96, + 0x30, 0x90, 0x32, 0x24, 0x5a, 0x29, 0xcc, 0x1f, 0x4e, 0xc1, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, + 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, + 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x99, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, + 0x8f, 0x12, 0x59, 0x65, 0x26, 0xba, 0xc9, 0x19, 0x89, 0x99, 0x79, 0xfa, 0x70, 0x91, 0x0a, 0x78, + 0x04, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x65, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x99, 0xf8, 0x10, 0x61, 0x33, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -267,6 +359,62 @@ func (m *QueryMarketsHardCapResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *QueryListingVaultDepositParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListingVaultDepositParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListingVaultDepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryListingVaultDepositParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryListingVaultDepositParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryListingVaultDepositParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -299,6 +447,26 @@ func (m *QueryMarketsHardCapResponse) Size() (n int) { return n } +func (m *QueryListingVaultDepositParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryListingVaultDepositParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -424,6 +592,139 @@ func (m *QueryMarketsHardCapResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryListingVaultDepositParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryListingVaultDepositParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryListingVaultDepositParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryListingVaultDepositParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryListingVaultDepositParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryListingVaultDepositParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protocol/x/listing/types/tx.pb.go b/protocol/x/listing/types/tx.pb.go index 2122f2fb5a..5da888bc0a 100644 --- a/protocol/x/listing/types/tx.pb.go +++ b/protocol/x/listing/types/tx.pb.go @@ -125,7 +125,7 @@ func (m *MsgSetMarketsHardCapResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetMarketsHardCapResponse proto.InternalMessageInfo // MsgCreateMarketPermissionless is a message used to create new markets without -// // going through x/gov +// going through x/gov type MsgCreateMarketPermissionless struct { // The name of the `Perpetual` (e.g. `BTC-USD`). Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"` @@ -220,49 +220,152 @@ func (m *MsgCreateMarketPermissionlessResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCreateMarketPermissionlessResponse proto.InternalMessageInfo +// MsgSetListingVaultDepositParams is a message used to set PML megavault +// deposit params +type MsgSetListingVaultDepositParams struct { + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Params which define the vault deposit for market listing + Params ListingVaultDepositParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgSetListingVaultDepositParams) Reset() { *m = MsgSetListingVaultDepositParams{} } +func (m *MsgSetListingVaultDepositParams) String() string { return proto.CompactTextString(m) } +func (*MsgSetListingVaultDepositParams) ProtoMessage() {} +func (*MsgSetListingVaultDepositParams) Descriptor() ([]byte, []int) { + return fileDescriptor_144a579c1e2dcb94, []int{4} +} +func (m *MsgSetListingVaultDepositParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetListingVaultDepositParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetListingVaultDepositParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetListingVaultDepositParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetListingVaultDepositParams.Merge(m, src) +} +func (m *MsgSetListingVaultDepositParams) XXX_Size() int { + return m.Size() +} +func (m *MsgSetListingVaultDepositParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetListingVaultDepositParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetListingVaultDepositParams proto.InternalMessageInfo + +func (m *MsgSetListingVaultDepositParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgSetListingVaultDepositParams) GetParams() ListingVaultDepositParams { + if m != nil { + return m.Params + } + return ListingVaultDepositParams{} +} + +// MsgSetListingVaultDepositParamsResponse defines the +// MsgSetListingVaultDepositParams response +type MsgSetListingVaultDepositParamsResponse struct { +} + +func (m *MsgSetListingVaultDepositParamsResponse) Reset() { + *m = MsgSetListingVaultDepositParamsResponse{} +} +func (m *MsgSetListingVaultDepositParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetListingVaultDepositParamsResponse) ProtoMessage() {} +func (*MsgSetListingVaultDepositParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_144a579c1e2dcb94, []int{5} +} +func (m *MsgSetListingVaultDepositParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetListingVaultDepositParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetListingVaultDepositParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetListingVaultDepositParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetListingVaultDepositParamsResponse.Merge(m, src) +} +func (m *MsgSetListingVaultDepositParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetListingVaultDepositParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetListingVaultDepositParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetListingVaultDepositParamsResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgSetMarketsHardCap)(nil), "dydxprotocol.listing.MsgSetMarketsHardCap") proto.RegisterType((*MsgSetMarketsHardCapResponse)(nil), "dydxprotocol.listing.MsgSetMarketsHardCapResponse") proto.RegisterType((*MsgCreateMarketPermissionless)(nil), "dydxprotocol.listing.MsgCreateMarketPermissionless") proto.RegisterType((*MsgCreateMarketPermissionlessResponse)(nil), "dydxprotocol.listing.MsgCreateMarketPermissionlessResponse") + proto.RegisterType((*MsgSetListingVaultDepositParams)(nil), "dydxprotocol.listing.MsgSetListingVaultDepositParams") + proto.RegisterType((*MsgSetListingVaultDepositParamsResponse)(nil), "dydxprotocol.listing.MsgSetListingVaultDepositParamsResponse") } func init() { proto.RegisterFile("dydxprotocol/listing/tx.proto", fileDescriptor_144a579c1e2dcb94) } var fileDescriptor_144a579c1e2dcb94 = []byte{ - // 505 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x51, 0x6b, 0xd3, 0x50, - 0x14, 0x6e, 0x3a, 0x18, 0xec, 0xba, 0x0e, 0x16, 0x82, 0xd6, 0xe0, 0xb2, 0x52, 0x50, 0xeb, 0x60, - 0x09, 0x76, 0x22, 0x38, 0x5f, 0xb4, 0x03, 0xd9, 0x90, 0x82, 0x26, 0x6f, 0xbe, 0x84, 0xdb, 0xe4, - 0x7a, 0x73, 0x59, 0x92, 0x9b, 0xdd, 0x73, 0x33, 0x5a, 0x1f, 0x7d, 0x13, 0x41, 0xfd, 0x29, 0x3e, - 0xf8, 0x23, 0xf6, 0x38, 0x7c, 0x12, 0x1f, 0x86, 0xb4, 0x0f, 0xfe, 0x0d, 0x69, 0x6e, 0xba, 0xb6, - 0xd8, 0x8d, 0xb2, 0xa7, 0x9e, 0x73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4d, 0x04, 0x75, 0xbc, 0xb3, 0xa1, 0xa5, 0x9d, 0x0f, 0x2d, 0xed, 0xcf, 0xd0, - 0xd2, 0xbe, 0x8d, 0xac, 0xca, 0xf9, 0xc8, 0xaa, 0xfc, 0x1a, 0x59, 0x95, 0x77, 0xcf, 0x96, 0x77, - 0xad, 0x3f, 0xfd, 0xae, 0xc7, 0xf6, 0xf5, 0x56, 0x0b, 0x64, 0xef, 0x5f, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x8a, 0xf1, 0x01, 0x5e, 0xfc, 0x03, 0x00, 0x00, + // 594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0x8d, 0xdb, 0x4f, 0x95, 0x3a, 0x5f, 0x53, 0xa9, 0x56, 0x04, 0xc1, 0x6a, 0x9d, 0x10, 0x09, + 0x9a, 0x56, 0xaa, 0x2d, 0x52, 0x40, 0xa2, 0x08, 0x09, 0x52, 0x84, 0x5a, 0x41, 0xa4, 0xe2, 0x48, + 0x2c, 0xd8, 0x58, 0x13, 0x7b, 0x70, 0x46, 0xb5, 0x3d, 0xee, 0xdc, 0x71, 0x95, 0xb0, 0x64, 0xc7, + 0x06, 0x58, 0xf0, 0x04, 0x3c, 0x01, 0x0b, 0x16, 0x3c, 0x42, 0x97, 0x15, 0x2b, 0xc4, 0xa2, 0x42, + 0xc9, 0x82, 0xd7, 0x40, 0xb1, 0x27, 0x7f, 0x6a, 0x12, 0xaa, 0xac, 0x3c, 0x33, 0xf7, 0xde, 0x73, + 0xcf, 0x9c, 0x7b, 0xc6, 0x68, 0xc3, 0x6d, 0xbb, 0xad, 0x88, 0x33, 0xc1, 0x1c, 0xe6, 0x9b, 0x3e, + 0x05, 0x41, 0x43, 0xcf, 0x14, 0x2d, 0x23, 0x39, 0x53, 0x73, 0xa3, 0x61, 0x43, 0x86, 0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x5d, 0x36, 0xf4, 0xf6, 0x64, + 0x5a, 0x93, 0xbc, 0xa6, 0x55, 0xae, 0x9e, 0xdb, 0x6f, 0xae, 0x7e, 0x50, 0x90, 0x36, 0xc3, 0x94, + 0xbb, 0x53, 0x21, 0xa7, 0x17, 0x69, 0x0f, 0xe7, 0x28, 0x1a, 0x10, 0xfa, 0xac, 0xa0, 0xf5, 0x99, + 0x03, 0xbf, 0x37, 0xeb, 0x96, 0x53, 0xcb, 0xb4, 0x47, 0x73, 0x95, 0xf5, 0x69, 0x55, 0xeb, 0x67, + 0x1d, 0x5d, 0x39, 0xef, 0xe8, 0xca, 0xef, 0x8e, 0xae, 0x7c, 0xea, 0xea, 0x99, 0xf3, 0xae, 0x9e, + 0xf9, 0xd9, 0xd5, 0x33, 0xaf, 0x1f, 0x5c, 0xfd, 0xc9, 0xb4, 0x86, 0xff, 0xdd, 0xde, 0xdb, 0x69, + 0x2c, 0x25, 0x91, 0xdd, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xde, 0xd1, 0xee, 0x34, 0x9c, 0x05, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -281,6 +384,8 @@ type MsgClient interface { SetMarketsHardCap(ctx context.Context, in *MsgSetMarketsHardCap, opts ...grpc.CallOption) (*MsgSetMarketsHardCapResponse, error) // CreateMarketPermissionless creates a new market without going through x/gov CreateMarketPermissionless(ctx context.Context, in *MsgCreateMarketPermissionless, opts ...grpc.CallOption) (*MsgCreateMarketPermissionlessResponse, error) + // SetListingVaultDepositParams sets PML megavault deposit params + SetListingVaultDepositParams(ctx context.Context, in *MsgSetListingVaultDepositParams, opts ...grpc.CallOption) (*MsgSetListingVaultDepositParamsResponse, error) } type msgClient struct { @@ -309,12 +414,23 @@ func (c *msgClient) CreateMarketPermissionless(ctx context.Context, in *MsgCreat return out, nil } +func (c *msgClient) SetListingVaultDepositParams(ctx context.Context, in *MsgSetListingVaultDepositParams, opts ...grpc.CallOption) (*MsgSetListingVaultDepositParamsResponse, error) { + out := new(MsgSetListingVaultDepositParamsResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.listing.Msg/SetListingVaultDepositParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // SetMarketsHardCap sets a hard cap on the number of markets listed SetMarketsHardCap(context.Context, *MsgSetMarketsHardCap) (*MsgSetMarketsHardCapResponse, error) // CreateMarketPermissionless creates a new market without going through x/gov CreateMarketPermissionless(context.Context, *MsgCreateMarketPermissionless) (*MsgCreateMarketPermissionlessResponse, error) + // SetListingVaultDepositParams sets PML megavault deposit params + SetListingVaultDepositParams(context.Context, *MsgSetListingVaultDepositParams) (*MsgSetListingVaultDepositParamsResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -327,6 +443,9 @@ func (*UnimplementedMsgServer) SetMarketsHardCap(ctx context.Context, req *MsgSe func (*UnimplementedMsgServer) CreateMarketPermissionless(ctx context.Context, req *MsgCreateMarketPermissionless) (*MsgCreateMarketPermissionlessResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateMarketPermissionless not implemented") } +func (*UnimplementedMsgServer) SetListingVaultDepositParams(ctx context.Context, req *MsgSetListingVaultDepositParams) (*MsgSetListingVaultDepositParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetListingVaultDepositParams not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -368,6 +487,24 @@ func _Msg_CreateMarketPermissionless_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _Msg_SetListingVaultDepositParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetListingVaultDepositParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetListingVaultDepositParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.listing.Msg/SetListingVaultDepositParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetListingVaultDepositParams(ctx, req.(*MsgSetListingVaultDepositParams)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "dydxprotocol.listing.Msg", HandlerType: (*MsgServer)(nil), @@ -380,6 +517,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "CreateMarketPermissionless", Handler: _Msg_CreateMarketPermissionless_Handler, }, + { + MethodName: "SetListingVaultDepositParams", + Handler: _Msg_SetListingVaultDepositParams_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "dydxprotocol/listing/tx.proto", @@ -518,6 +659,69 @@ func (m *MsgCreateMarketPermissionlessResponse) MarshalToSizedBuffer(dAtA []byte return len(dAtA) - i, nil } +func (m *MsgSetListingVaultDepositParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetListingVaultDepositParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetListingVaultDepositParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetListingVaultDepositParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetListingVaultDepositParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetListingVaultDepositParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -582,6 +786,30 @@ func (m *MsgCreateMarketPermissionlessResponse) Size() (n int) { return n } +func (m *MsgSetListingVaultDepositParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgSetListingVaultDepositParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -940,6 +1168,171 @@ func (m *MsgCreateMarketPermissionlessResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSetListingVaultDepositParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetListingVaultDepositParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetListingVaultDepositParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetListingVaultDepositParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetListingVaultDepositParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetListingVaultDepositParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0