Skip to content

Commit 33086e8

Browse files
committed
Revert commits to state at 851081a
1 parent 1ef1f17 commit 33086e8

File tree

31 files changed

+399
-3786
lines changed

31 files changed

+399
-3786
lines changed

Makefile

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@ proto-gen:
1313
@echo "Generating Protobuf files"
1414
@$(protoImage) sh ./protocol/scripts/protocgen.sh
1515

16-
proto-clean:
17-
@rm -rf ./proto/.proto-export
18-
@rm -rf ./.proto-export
19-
20-
proto-gen-clean:
21-
@echo "Cleaning old artifacts"
22-
@rm -rf ./proto/.proto-export
23-
@rm -rf ./.proto-export
24-
@echo "Generating Protobuf files"
25-
@$(protoImage) sh ./protocol/scripts/protocgen.sh
26-
@cd proto && make proto-export-v4-proto-js
27-
2816
proto-check-bc-breaking:
2917
@rm -rf ./.proto-export
3018
@$(protoImage) buf breaking --against .git#branch=$$(git merge-base HEAD origin/main)

indexer/packages/v4-protos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"build:prod": "rm -rf build/ && tsc",
1111
"build:watch": "pnpm run build -- --watch",
1212
"test": "echo \"Error: no test specified\"",
13-
"build:proto": "(cd ../../../proto && rm -rf .proto-export && cd ../ && rm -rf .proto-export && make proto-export) && rm -rf src/codegen && telescope transpile --protoDirs ../../../.proto-export --outPath ./src/codegen --no-includeAminos --includeLCDClients --includeRPCClients",
13+
"build:proto": "(cd ../../.. && make proto-export) && rm -rf src/codegen && telescope transpile --protoDirs ../../../.proto-export --outPath ./src/codegen --no-includeAminos --includeLCDClients --includeRPCClients",
1414
"build:verify-proto": "pnpm run build:proto && git diff --exit-code src/codegen",
1515
"postinstall": "patch-package"
1616
},

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

Lines changed: 0 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -74,60 +74,6 @@ export interface AffiliateWhitelist_TierSDKType {
7474

7575
taker_fee_share_ppm: number;
7676
}
77-
/** AffiliateParameters defines the parameters for the affiliate program. */
78-
79-
export interface AffiliateParameters {
80-
/**
81-
* Maximum attributable volume for a referred user in a 30d rolling window in
82-
* notional
83-
*/
84-
maximum_30dAttributableVolumePerReferredUserQuoteQuantums: Long;
85-
/** Referred user automatically gets set to this fee tier */
86-
87-
refereeMinimumFeeTierIdx: number;
88-
/**
89-
* Maximum affiliate revenue for a referred user in a 30d rolling window in
90-
* quote quantums
91-
*/
92-
93-
maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums: Long;
94-
}
95-
/** AffiliateParameters defines the parameters for the affiliate program. */
96-
97-
export interface AffiliateParametersSDKType {
98-
/**
99-
* Maximum attributable volume for a referred user in a 30d rolling window in
100-
* notional
101-
*/
102-
maximum_30d_attributable_volume_per_referred_user_quote_quantums: Long;
103-
/** Referred user automatically gets set to this fee tier */
104-
105-
referee_minimum_fee_tier_idx: number;
106-
/**
107-
* Maximum affiliate revenue for a referred user in a 30d rolling window in
108-
* quote quantums
109-
*/
110-
111-
maximum_30d_affiliate_revenue_per_referred_user_quote_quantums: Long;
112-
}
113-
/** AffiliateOverrides defines the affiliate whitelist. */
114-
115-
export interface AffiliateOverrides {
116-
/**
117-
* List of unique whitelisted addresses.
118-
* These are automatically put at the maximum affiliate tier
119-
*/
120-
addresses: string[];
121-
}
122-
/** AffiliateOverrides defines the affiliate whitelist. */
123-
124-
export interface AffiliateOverridesSDKType {
125-
/**
126-
* List of unique whitelisted addresses.
127-
* These are automatically put at the maximum affiliate tier
128-
*/
129-
addresses: string[];
130-
}
13177

13278
function createBaseAffiliateTiers(): AffiliateTiers {
13379
return {
@@ -337,114 +283,4 @@ export const AffiliateWhitelist_Tier = {
337283
return message;
338284
}
339285

340-
};
341-
342-
function createBaseAffiliateParameters(): AffiliateParameters {
343-
return {
344-
maximum_30dAttributableVolumePerReferredUserQuoteQuantums: Long.UZERO,
345-
refereeMinimumFeeTierIdx: 0,
346-
maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums: Long.UZERO
347-
};
348-
}
349-
350-
export const AffiliateParameters = {
351-
encode(message: AffiliateParameters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
352-
if (!message.maximum_30dAttributableVolumePerReferredUserQuoteQuantums.isZero()) {
353-
writer.uint32(8).uint64(message.maximum_30dAttributableVolumePerReferredUserQuoteQuantums);
354-
}
355-
356-
if (message.refereeMinimumFeeTierIdx !== 0) {
357-
writer.uint32(16).uint32(message.refereeMinimumFeeTierIdx);
358-
}
359-
360-
if (!message.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums.isZero()) {
361-
writer.uint32(24).uint64(message.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums);
362-
}
363-
364-
return writer;
365-
},
366-
367-
decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateParameters {
368-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
369-
let end = length === undefined ? reader.len : reader.pos + length;
370-
const message = createBaseAffiliateParameters();
371-
372-
while (reader.pos < end) {
373-
const tag = reader.uint32();
374-
375-
switch (tag >>> 3) {
376-
case 1:
377-
message.maximum_30dAttributableVolumePerReferredUserQuoteQuantums = (reader.uint64() as Long);
378-
break;
379-
380-
case 2:
381-
message.refereeMinimumFeeTierIdx = reader.uint32();
382-
break;
383-
384-
case 3:
385-
message.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums = (reader.uint64() as Long);
386-
break;
387-
388-
default:
389-
reader.skipType(tag & 7);
390-
break;
391-
}
392-
}
393-
394-
return message;
395-
},
396-
397-
fromPartial(object: DeepPartial<AffiliateParameters>): AffiliateParameters {
398-
const message = createBaseAffiliateParameters();
399-
message.maximum_30dAttributableVolumePerReferredUserQuoteQuantums = object.maximum_30dAttributableVolumePerReferredUserQuoteQuantums !== undefined && object.maximum_30dAttributableVolumePerReferredUserQuoteQuantums !== null ? Long.fromValue(object.maximum_30dAttributableVolumePerReferredUserQuoteQuantums) : Long.UZERO;
400-
message.refereeMinimumFeeTierIdx = object.refereeMinimumFeeTierIdx ?? 0;
401-
message.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums = object.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums !== undefined && object.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums !== null ? Long.fromValue(object.maximum_30dAffiliateRevenuePerReferredUserQuoteQuantums) : Long.UZERO;
402-
return message;
403-
}
404-
405-
};
406-
407-
function createBaseAffiliateOverrides(): AffiliateOverrides {
408-
return {
409-
addresses: []
410-
};
411-
}
412-
413-
export const AffiliateOverrides = {
414-
encode(message: AffiliateOverrides, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
415-
for (const v of message.addresses) {
416-
writer.uint32(10).string(v!);
417-
}
418-
419-
return writer;
420-
},
421-
422-
decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateOverrides {
423-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
424-
let end = length === undefined ? reader.len : reader.pos + length;
425-
const message = createBaseAffiliateOverrides();
426-
427-
while (reader.pos < end) {
428-
const tag = reader.uint32();
429-
430-
switch (tag >>> 3) {
431-
case 1:
432-
message.addresses.push(reader.string());
433-
break;
434-
435-
default:
436-
reader.skipType(tag & 7);
437-
break;
438-
}
439-
}
440-
441-
return message;
442-
},
443-
444-
fromPartial(object: DeepPartial<AffiliateOverrides>): AffiliateOverrides {
445-
const message = createBaseAffiliateOverrides();
446-
message.addresses = object.addresses?.map(e => e) || [];
447-
return message;
448-
}
449-
450286
};

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { LCDClient } from "@osmonauts/lcd";
2-
import { AffiliateInfoRequest, AffiliateInfoResponseSDKType, ReferredByRequest, ReferredByResponseSDKType, AllAffiliateTiersRequest, AllAffiliateTiersResponseSDKType, AffiliateWhitelistRequest, AffiliateWhitelistResponseSDKType, AffiliateParametersRequest, AffiliateParametersResponseSDKType, AffiliateOverridesRequest, AffiliateOverridesResponseSDKType } from "./query";
2+
import { AffiliateInfoRequest, AffiliateInfoResponseSDKType, ReferredByRequest, ReferredByResponseSDKType, AllAffiliateTiersRequest, AllAffiliateTiersResponseSDKType, AffiliateWhitelistRequest, AffiliateWhitelistResponseSDKType } from "./query";
33
export class LCDQueryClient {
44
req: LCDClient;
55

@@ -13,8 +13,6 @@ export class LCDQueryClient {
1313
this.referredBy = this.referredBy.bind(this);
1414
this.allAffiliateTiers = this.allAffiliateTiers.bind(this);
1515
this.affiliateWhitelist = this.affiliateWhitelist.bind(this);
16-
this.affiliateParameters = this.affiliateParameters.bind(this);
17-
this.affiliateOverrides = this.affiliateOverrides.bind(this);
1816
}
1917
/* Query AffiliateInfo returns the affiliate info for a given address. */
2018

@@ -44,19 +42,5 @@ export class LCDQueryClient {
4442
const endpoint = `dydxprotocol/affiliates/affiliate_whitelist`;
4543
return await this.req.get<AffiliateWhitelistResponseSDKType>(endpoint);
4644
}
47-
/* Query AffiliateParameters returns the affiliate parameters. */
48-
49-
50-
async affiliateParameters(_params: AffiliateParametersRequest = {}): Promise<AffiliateParametersResponseSDKType> {
51-
const endpoint = `dydxprotocol/affiliates/affiliate_parameters`;
52-
return await this.req.get<AffiliateParametersResponseSDKType>(endpoint);
53-
}
54-
/* Query AffiliateOverrides returns the affiliate overrides. */
55-
56-
57-
async affiliateOverrides(_params: AffiliateOverridesRequest = {}): Promise<AffiliateOverridesResponseSDKType> {
58-
const endpoint = `dydxprotocol/affiliates/affiliate_overrides`;
59-
return await this.req.get<AffiliateOverridesResponseSDKType>(endpoint);
60-
}
6145

6246
}

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

Lines changed: 1 addition & 29 deletions
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 { AffiliateInfoRequest, AffiliateInfoResponse, ReferredByRequest, ReferredByResponse, AllAffiliateTiersRequest, AllAffiliateTiersResponse, AffiliateWhitelistRequest, AffiliateWhitelistResponse, AffiliateParametersRequest, AffiliateParametersResponse, AffiliateOverridesRequest, AffiliateOverridesResponse } from "./query";
4+
import { AffiliateInfoRequest, AffiliateInfoResponse, ReferredByRequest, ReferredByResponse, AllAffiliateTiersRequest, AllAffiliateTiersResponse, AffiliateWhitelistRequest, AffiliateWhitelistResponse } from "./query";
55
/** Query defines the gRPC querier service. */
66

77
export interface Query {
@@ -16,12 +16,6 @@ export interface Query {
1616
/** Query AffiliateWhitelist returns the affiliate whitelist. */
1717

1818
affiliateWhitelist(request?: AffiliateWhitelistRequest): Promise<AffiliateWhitelistResponse>;
19-
/** Query AffiliateParameters returns the affiliate parameters. */
20-
21-
affiliateParameters(request?: AffiliateParametersRequest): Promise<AffiliateParametersResponse>;
22-
/** Query AffiliateOverrides returns the affiliate overrides. */
23-
24-
affiliateOverrides(request?: AffiliateOverridesRequest): Promise<AffiliateOverridesResponse>;
2519
}
2620
export class QueryClientImpl implements Query {
2721
private readonly rpc: Rpc;
@@ -32,8 +26,6 @@ export class QueryClientImpl implements Query {
3226
this.referredBy = this.referredBy.bind(this);
3327
this.allAffiliateTiers = this.allAffiliateTiers.bind(this);
3428
this.affiliateWhitelist = this.affiliateWhitelist.bind(this);
35-
this.affiliateParameters = this.affiliateParameters.bind(this);
36-
this.affiliateOverrides = this.affiliateOverrides.bind(this);
3729
}
3830

3931
affiliateInfo(request: AffiliateInfoRequest): Promise<AffiliateInfoResponse> {
@@ -60,18 +52,6 @@ export class QueryClientImpl implements Query {
6052
return promise.then(data => AffiliateWhitelistResponse.decode(new _m0.Reader(data)));
6153
}
6254

63-
affiliateParameters(request: AffiliateParametersRequest = {}): Promise<AffiliateParametersResponse> {
64-
const data = AffiliateParametersRequest.encode(request).finish();
65-
const promise = this.rpc.request("dydxprotocol.affiliates.Query", "AffiliateParameters", data);
66-
return promise.then(data => AffiliateParametersResponse.decode(new _m0.Reader(data)));
67-
}
68-
69-
affiliateOverrides(request: AffiliateOverridesRequest = {}): Promise<AffiliateOverridesResponse> {
70-
const data = AffiliateOverridesRequest.encode(request).finish();
71-
const promise = this.rpc.request("dydxprotocol.affiliates.Query", "AffiliateOverrides", data);
72-
return promise.then(data => AffiliateOverridesResponse.decode(new _m0.Reader(data)));
73-
}
74-
7555
}
7656
export const createRpcQueryExtension = (base: QueryClient) => {
7757
const rpc = createProtobufRpcClient(base);
@@ -91,14 +71,6 @@ export const createRpcQueryExtension = (base: QueryClient) => {
9171

9272
affiliateWhitelist(request?: AffiliateWhitelistRequest): Promise<AffiliateWhitelistResponse> {
9373
return queryService.affiliateWhitelist(request);
94-
},
95-
96-
affiliateParameters(request?: AffiliateParametersRequest): Promise<AffiliateParametersResponse> {
97-
return queryService.affiliateParameters(request);
98-
},
99-
100-
affiliateOverrides(request?: AffiliateOverridesRequest): Promise<AffiliateOverridesResponse> {
101-
return queryService.affiliateOverrides(request);
10274
}
10375

10476
};

0 commit comments

Comments
 (0)