Skip to content

Commit cea458b

Browse files
jusbar23mergify[bot]davidli1997shrenujbKefancao
authored
Release/protocol/v9.5.x (#3277)
Signed-off-by: Shrenuj Bansal <shrenuj@dydx.exchange> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: David Li <h396lidavid@gmail.com> Co-authored-by: shrenujb <98204323+shrenujb@users.noreply.github.com> Co-authored-by: Kefan Cao <kefan@dydx.exchange>
1 parent e40fc8c commit cea458b

65 files changed

Lines changed: 5161 additions & 955 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ export interface AffiliateTiersSDKType {
1717
export interface AffiliateTiers_Tier {
1818
/** Required all-time referred volume in quote quantums. */
1919
reqReferredVolumeQuoteQuantums: Long;
20-
/** Required currently staked native tokens (in whole coins). */
20+
/**
21+
* Required currently staked native tokens (in whole coins).
22+
* This is deprecated
23+
*/
24+
25+
/** @deprecated */
2126

2227
reqStakedWholeCoins: number;
2328
/** Taker fee share in parts-per-million. */
@@ -29,7 +34,12 @@ export interface AffiliateTiers_Tier {
2934
export interface AffiliateTiers_TierSDKType {
3035
/** Required all-time referred volume in quote quantums. */
3136
req_referred_volume_quote_quantums: Long;
32-
/** Required currently staked native tokens (in whole coins). */
37+
/**
38+
* Required currently staked native tokens (in whole coins).
39+
* This is deprecated
40+
*/
41+
42+
/** @deprecated */
3343

3444
req_staked_whole_coins: number;
3545
/** Taker fee share in parts-per-million. */

indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export interface AffiliateInfoResponse {
4848
/** The affiliate's 30d referred volume in quote quantums. */
4949

5050
referredVolume_30dRolling: Uint8Array;
51+
/** The affiliate's 30d attributed volume in quote quantums (from referees). */
52+
53+
attributedVolume_30dRolling: Uint8Array;
5154
}
5255
/**
5356
* AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC
@@ -80,6 +83,9 @@ export interface AffiliateInfoResponseSDKType {
8083
/** The affiliate's 30d referred volume in quote quantums. */
8184

8285
referred_volume_30d_rolling: Uint8Array;
86+
/** The affiliate's 30d attributed volume in quote quantums (from referees). */
87+
88+
attributed_volume_30d_rolling: Uint8Array;
8389
}
8490
/** ReferredByRequest is the request type for the Query/ReferredBy RPC method. */
8591

@@ -272,7 +278,8 @@ function createBaseAffiliateInfoResponse(): AffiliateInfoResponse {
272278
feeSharePpm: 0,
273279
referredVolume: new Uint8Array(),
274280
stakedAmount: new Uint8Array(),
275-
referredVolume_30dRolling: new Uint8Array()
281+
referredVolume_30dRolling: new Uint8Array(),
282+
attributedVolume_30dRolling: new Uint8Array()
276283
};
277284
}
278285

@@ -302,6 +309,10 @@ export const AffiliateInfoResponse = {
302309
writer.uint32(50).bytes(message.referredVolume_30dRolling);
303310
}
304311

312+
if (message.attributedVolume_30dRolling.length !== 0) {
313+
writer.uint32(58).bytes(message.attributedVolume_30dRolling);
314+
}
315+
305316
return writer;
306317
},
307318

@@ -338,6 +349,10 @@ export const AffiliateInfoResponse = {
338349
message.referredVolume_30dRolling = reader.bytes();
339350
break;
340351

352+
case 7:
353+
message.attributedVolume_30dRolling = reader.bytes();
354+
break;
355+
341356
default:
342357
reader.skipType(tag & 7);
343358
break;
@@ -355,6 +370,7 @@ export const AffiliateInfoResponse = {
355370
message.referredVolume = object.referredVolume ?? new Uint8Array();
356371
message.stakedAmount = object.stakedAmount ?? new Uint8Array();
357372
message.referredVolume_30dRolling = object.referredVolume_30dRolling ?? new Uint8Array();
373+
message.attributedVolume_30dRolling = object.attributedVolume_30dRolling ?? new Uint8Array();
358374
return message;
359375
}
360376

indexer/packages/v4-protos/src/codegen/dydxprotocol/sending/transfer.ts

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,42 @@ export interface MsgSendFromModuleToAccountSDKType {
148148

149149
coin?: CoinSDKType;
150150
}
151+
/**
152+
* MsgSendFromAccountToAccount represents a single transfer from one
153+
* `x/bank` account to another `x/bank` account.
154+
* Should only be executed by governance.
155+
*/
156+
157+
export interface MsgSendFromAccountToAccount {
158+
authority: string;
159+
/** The sender account address. */
160+
161+
sender: string;
162+
/** The recipient account address. */
163+
164+
recipient: string;
165+
/** The coin to transfer, which specifies both denom and amount. */
166+
167+
coin?: Coin;
168+
}
169+
/**
170+
* MsgSendFromAccountToAccount represents a single transfer from one
171+
* `x/bank` account to another `x/bank` account.
172+
* Should only be executed by governance.
173+
*/
174+
175+
export interface MsgSendFromAccountToAccountSDKType {
176+
authority: string;
177+
/** The sender account address. */
178+
179+
sender: string;
180+
/** The recipient account address. */
181+
182+
recipient: string;
183+
/** The coin to transfer, which specifies both denom and amount. */
184+
185+
coin?: CoinSDKType;
186+
}
151187

152188
function createBaseTransfer(): Transfer {
153189
return {
@@ -447,4 +483,79 @@ export const MsgSendFromModuleToAccount = {
447483
return message;
448484
}
449485

486+
};
487+
488+
function createBaseMsgSendFromAccountToAccount(): MsgSendFromAccountToAccount {
489+
return {
490+
authority: "",
491+
sender: "",
492+
recipient: "",
493+
coin: undefined
494+
};
495+
}
496+
497+
export const MsgSendFromAccountToAccount = {
498+
encode(message: MsgSendFromAccountToAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
499+
if (message.authority !== "") {
500+
writer.uint32(10).string(message.authority);
501+
}
502+
503+
if (message.sender !== "") {
504+
writer.uint32(18).string(message.sender);
505+
}
506+
507+
if (message.recipient !== "") {
508+
writer.uint32(26).string(message.recipient);
509+
}
510+
511+
if (message.coin !== undefined) {
512+
Coin.encode(message.coin, writer.uint32(34).fork()).ldelim();
513+
}
514+
515+
return writer;
516+
},
517+
518+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendFromAccountToAccount {
519+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
520+
let end = length === undefined ? reader.len : reader.pos + length;
521+
const message = createBaseMsgSendFromAccountToAccount();
522+
523+
while (reader.pos < end) {
524+
const tag = reader.uint32();
525+
526+
switch (tag >>> 3) {
527+
case 1:
528+
message.authority = reader.string();
529+
break;
530+
531+
case 2:
532+
message.sender = reader.string();
533+
break;
534+
535+
case 3:
536+
message.recipient = reader.string();
537+
break;
538+
539+
case 4:
540+
message.coin = Coin.decode(reader, reader.uint32());
541+
break;
542+
543+
default:
544+
reader.skipType(tag & 7);
545+
break;
546+
}
547+
}
548+
549+
return message;
550+
},
551+
552+
fromPartial(object: DeepPartial<MsgSendFromAccountToAccount>): MsgSendFromAccountToAccount {
553+
const message = createBaseMsgSendFromAccountToAccount();
554+
message.authority = object.authority ?? "";
555+
message.sender = object.sender ?? "";
556+
message.recipient = object.recipient ?? "";
557+
message.coin = object.coin !== undefined && object.coin !== null ? Coin.fromPartial(object.coin) : undefined;
558+
return message;
559+
}
560+
450561
};

indexer/packages/v4-protos/src/codegen/dydxprotocol/sending/tx.rpc.msg.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { MsgDepositToSubaccount, MsgWithdrawFromSubaccount, MsgSendFromModuleToAccount } from "./transfer";
1+
import { MsgDepositToSubaccount, MsgWithdrawFromSubaccount, MsgSendFromModuleToAccount, MsgSendFromAccountToAccount } from "./transfer";
22
import { Rpc } from "../../helpers";
33
import * as _m0 from "protobufjs/minimal";
4-
import { MsgCreateTransfer, MsgCreateTransferResponse, MsgDepositToSubaccountResponse, MsgWithdrawFromSubaccountResponse, MsgSendFromModuleToAccountResponse } from "./tx";
4+
import { MsgCreateTransfer, MsgCreateTransferResponse, MsgDepositToSubaccountResponse, MsgWithdrawFromSubaccountResponse, MsgSendFromModuleToAccountResponse, MsgSendFromAccountToAccountResponse } from "./tx";
55
/** Msg defines the Msg service. */
66

77
export interface Msg {
@@ -25,6 +25,12 @@ export interface Msg {
2525
*/
2626

2727
sendFromModuleToAccount(request: MsgSendFromModuleToAccount): Promise<MsgSendFromModuleToAccountResponse>;
28+
/**
29+
* SendFromAccountToAccount initiates a new transfer from an `x/bank` account
30+
* to another `x/bank` account (should only be executed by governance).
31+
*/
32+
33+
sendFromAccountToAccount(request: MsgSendFromAccountToAccount): Promise<MsgSendFromAccountToAccountResponse>;
2834
}
2935
export class MsgClientImpl implements Msg {
3036
private readonly rpc: Rpc;
@@ -35,6 +41,7 @@ export class MsgClientImpl implements Msg {
3541
this.depositToSubaccount = this.depositToSubaccount.bind(this);
3642
this.withdrawFromSubaccount = this.withdrawFromSubaccount.bind(this);
3743
this.sendFromModuleToAccount = this.sendFromModuleToAccount.bind(this);
44+
this.sendFromAccountToAccount = this.sendFromAccountToAccount.bind(this);
3845
}
3946

4047
createTransfer(request: MsgCreateTransfer): Promise<MsgCreateTransferResponse> {
@@ -61,4 +68,10 @@ export class MsgClientImpl implements Msg {
6168
return promise.then(data => MsgSendFromModuleToAccountResponse.decode(new _m0.Reader(data)));
6269
}
6370

71+
sendFromAccountToAccount(request: MsgSendFromAccountToAccount): Promise<MsgSendFromAccountToAccountResponse> {
72+
const data = MsgSendFromAccountToAccount.encode(request).finish();
73+
const promise = this.rpc.request("dydxprotocol.sending.Msg", "SendFromAccountToAccount", data);
74+
return promise.then(data => MsgSendFromAccountToAccountResponse.decode(new _m0.Reader(data)));
75+
}
76+
6477
}

indexer/packages/v4-protos/src/codegen/dydxprotocol/sending/tx.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ export interface MsgSendFromModuleToAccountResponse {}
5555
*/
5656

5757
export interface MsgSendFromModuleToAccountResponseSDKType {}
58+
/**
59+
* MsgSendFromAccountToAccountResponse is a response type used for new
60+
* account-to-account transfers.
61+
*/
62+
63+
export interface MsgSendFromAccountToAccountResponse {}
64+
/**
65+
* MsgSendFromAccountToAccountResponse is a response type used for new
66+
* account-to-account transfers.
67+
*/
68+
69+
export interface MsgSendFromAccountToAccountResponseSDKType {}
5870

5971
function createBaseMsgCreateTransfer(): MsgCreateTransfer {
6072
return {
@@ -235,4 +247,38 @@ export const MsgSendFromModuleToAccountResponse = {
235247
return message;
236248
}
237249

250+
};
251+
252+
function createBaseMsgSendFromAccountToAccountResponse(): MsgSendFromAccountToAccountResponse {
253+
return {};
254+
}
255+
256+
export const MsgSendFromAccountToAccountResponse = {
257+
encode(_: MsgSendFromAccountToAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
258+
return writer;
259+
},
260+
261+
decode(input: _m0.Reader | Uint8Array, length?: number): MsgSendFromAccountToAccountResponse {
262+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
263+
let end = length === undefined ? reader.len : reader.pos + length;
264+
const message = createBaseMsgSendFromAccountToAccountResponse();
265+
266+
while (reader.pos < end) {
267+
const tag = reader.uint32();
268+
269+
switch (tag >>> 3) {
270+
default:
271+
reader.skipType(tag & 7);
272+
break;
273+
}
274+
}
275+
276+
return message;
277+
},
278+
279+
fromPartial(_: DeepPartial<MsgSendFromAccountToAccountResponse>): MsgSendFromAccountToAccountResponse {
280+
const message = createBaseMsgSendFromAccountToAccountResponse();
281+
return message;
282+
}
283+
238284
};

indexer/packages/v4-protos/src/codegen/dydxprotocol/stats/query.lcd.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LCDClient } from "@osmonauts/lcd";
2-
import { QueryParamsRequest, QueryParamsResponseSDKType, QueryStatsMetadataRequest, QueryStatsMetadataResponseSDKType, QueryGlobalStatsRequest, QueryGlobalStatsResponseSDKType, QueryUserStatsRequest, QueryUserStatsResponseSDKType } from "./query";
2+
import { QueryParamsRequest, QueryParamsResponseSDKType, QueryStatsMetadataRequest, QueryStatsMetadataResponseSDKType, QueryGlobalStatsRequest, QueryGlobalStatsResponseSDKType, QueryUserStatsRequest, QueryUserStatsResponseSDKType, QueryEpochStatsRequest, QueryEpochStatsResponseSDKType } from "./query";
33
export class LCDQueryClient {
44
req: LCDClient;
55

@@ -13,6 +13,7 @@ export class LCDQueryClient {
1313
this.statsMetadata = this.statsMetadata.bind(this);
1414
this.globalStats = this.globalStats.bind(this);
1515
this.userStats = this.userStats.bind(this);
16+
this.epochStats = this.epochStats.bind(this);
1617
}
1718
/* Queries the Params. */
1819

@@ -50,5 +51,12 @@ export class LCDQueryClient {
5051
const endpoint = `dydxprotocol/v4/stats/user_stats`;
5152
return await this.req.get<QueryUserStatsResponseSDKType>(endpoint, options);
5253
}
54+
/* Queries EpochStats for a specific epoch. */
55+
56+
57+
async epochStats(params: QueryEpochStatsRequest): Promise<QueryEpochStatsResponseSDKType> {
58+
const endpoint = `dydxprotocol/v4/stats/epoch_stats/${params.epoch}`;
59+
return await this.req.get<QueryEpochStatsResponseSDKType>(endpoint);
60+
}
5361

5462
}

indexer/packages/v4-protos/src/codegen/dydxprotocol/stats/query.rpc.Query.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Rpc } from "../../helpers";
22
import * as _m0 from "protobufjs/minimal";
33
import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate";
4-
import { QueryParamsRequest, QueryParamsResponse, QueryStatsMetadataRequest, QueryStatsMetadataResponse, QueryGlobalStatsRequest, QueryGlobalStatsResponse, QueryUserStatsRequest, QueryUserStatsResponse } from "./query";
4+
import { QueryParamsRequest, QueryParamsResponse, QueryStatsMetadataRequest, QueryStatsMetadataResponse, QueryGlobalStatsRequest, QueryGlobalStatsResponse, QueryUserStatsRequest, QueryUserStatsResponse, QueryEpochStatsRequest, QueryEpochStatsResponse } from "./query";
55
/** Query defines the gRPC querier service. */
66

77
export interface Query {
@@ -16,6 +16,9 @@ export interface Query {
1616
/** Queries UserStats. */
1717

1818
userStats(request: QueryUserStatsRequest): Promise<QueryUserStatsResponse>;
19+
/** Queries EpochStats for a specific epoch. */
20+
21+
epochStats(request: QueryEpochStatsRequest): Promise<QueryEpochStatsResponse>;
1922
}
2023
export class QueryClientImpl implements Query {
2124
private readonly rpc: Rpc;
@@ -26,6 +29,7 @@ export class QueryClientImpl implements Query {
2629
this.statsMetadata = this.statsMetadata.bind(this);
2730
this.globalStats = this.globalStats.bind(this);
2831
this.userStats = this.userStats.bind(this);
32+
this.epochStats = this.epochStats.bind(this);
2933
}
3034

3135
params(request: QueryParamsRequest = {}): Promise<QueryParamsResponse> {
@@ -52,6 +56,12 @@ export class QueryClientImpl implements Query {
5256
return promise.then(data => QueryUserStatsResponse.decode(new _m0.Reader(data)));
5357
}
5458

59+
epochStats(request: QueryEpochStatsRequest): Promise<QueryEpochStatsResponse> {
60+
const data = QueryEpochStatsRequest.encode(request).finish();
61+
const promise = this.rpc.request("dydxprotocol.stats.Query", "EpochStats", data);
62+
return promise.then(data => QueryEpochStatsResponse.decode(new _m0.Reader(data)));
63+
}
64+
5565
}
5666
export const createRpcQueryExtension = (base: QueryClient) => {
5767
const rpc = createProtobufRpcClient(base);
@@ -71,6 +81,10 @@ export const createRpcQueryExtension = (base: QueryClient) => {
7181

7282
userStats(request: QueryUserStatsRequest): Promise<QueryUserStatsResponse> {
7383
return queryService.userStats(request);
84+
},
85+
86+
epochStats(request: QueryEpochStatsRequest): Promise<QueryEpochStatsResponse> {
87+
return queryService.epochStats(request);
7488
}
7589

7690
};

0 commit comments

Comments
 (0)