diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts new file mode 100644 index 00000000000..dcb86eb10f2 --- /dev/null +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts @@ -0,0 +1,164 @@ +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial, Long } from "../../helpers"; +/** AffiliateTiers defines the affiliate tiers. */ + +export interface AffiliateTiers { + /** All affiliate tiers */ + tiers: AffiliateTiers_Tier[]; +} +/** AffiliateTiers defines the affiliate tiers. */ + +export interface AffiliateTiersSDKType { + /** All affiliate tiers */ + tiers: AffiliateTiers_TierSDKType[]; +} +/** Tier defines an affiliate tier. */ + +export interface AffiliateTiers_Tier { + /** Level of the tier */ + level: number; + /** Required all-time referred volume in quote quantums. */ + + reqReferredVolume: Long; + /** Required currently staked native tokens (in whole coins). */ + + reqStakedWholeCoins: number; + /** Taker fee share in parts-per-million. */ + + takerFeeSharePpm: number; +} +/** Tier defines an affiliate tier. */ + +export interface AffiliateTiers_TierSDKType { + /** Level of the tier */ + level: number; + /** Required all-time referred volume in quote quantums. */ + + req_referred_volume: Long; + /** Required currently staked native tokens (in whole coins). */ + + req_staked_whole_coins: number; + /** Taker fee share in parts-per-million. */ + + taker_fee_share_ppm: number; +} + +function createBaseAffiliateTiers(): AffiliateTiers { + return { + tiers: [] + }; +} + +export const AffiliateTiers = { + encode(message: AffiliateTiers, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + for (const v of message.tiers) { + AffiliateTiers_Tier.encode(v!, writer.uint32(10).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateTiers { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAffiliateTiers(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.tiers.push(AffiliateTiers_Tier.decode(reader, reader.uint32())); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): AffiliateTiers { + const message = createBaseAffiliateTiers(); + message.tiers = object.tiers?.map(e => AffiliateTiers_Tier.fromPartial(e)) || []; + return message; + } + +}; + +function createBaseAffiliateTiers_Tier(): AffiliateTiers_Tier { + return { + level: 0, + reqReferredVolume: Long.UZERO, + reqStakedWholeCoins: 0, + takerFeeSharePpm: 0 + }; +} + +export const AffiliateTiers_Tier = { + encode(message: AffiliateTiers_Tier, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.level !== 0) { + writer.uint32(8).uint32(message.level); + } + + if (!message.reqReferredVolume.isZero()) { + writer.uint32(16).uint64(message.reqReferredVolume); + } + + if (message.reqStakedWholeCoins !== 0) { + writer.uint32(24).uint32(message.reqStakedWholeCoins); + } + + if (message.takerFeeSharePpm !== 0) { + writer.uint32(32).uint32(message.takerFeeSharePpm); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateTiers_Tier { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAffiliateTiers_Tier(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.level = reader.uint32(); + break; + + case 2: + message.reqReferredVolume = (reader.uint64() as Long); + break; + + case 3: + message.reqStakedWholeCoins = reader.uint32(); + break; + + case 4: + message.takerFeeSharePpm = reader.uint32(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): AffiliateTiers_Tier { + const message = createBaseAffiliateTiers_Tier(); + message.level = object.level ?? 0; + message.reqReferredVolume = object.reqReferredVolume !== undefined && object.reqReferredVolume !== null ? Long.fromValue(object.reqReferredVolume) : Long.UZERO; + message.reqStakedWholeCoins = object.reqStakedWholeCoins ?? 0; + message.takerFeeSharePpm = object.takerFeeSharePpm ?? 0; + return message; + } + +}; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts index ab81adee85c..51a635f7a99 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts @@ -1,18 +1,63 @@ import { Rpc } from "../../helpers"; +import * as _m0 from "protobufjs/minimal"; import { QueryClient, createProtobufRpcClient } from "@cosmjs/stargate"; +import { AffiliateInfoRequest, AffiliateInfoResponse, ReferredByRequest, ReferredByResponse, AllAffiliateTiersRequest, AllAffiliateTiersResponse } from "./query"; /** Query defines the gRPC querier service. */ -export interface Query {} +export interface Query { + /** Query AffiliateInfo returns the affiliate info for a given address. */ + affiliateInfo(request: AffiliateInfoRequest): Promise; + /** Query ReferredBy returns the affiliate that referred a given address. */ + + referredBy(request: ReferredByRequest): Promise; + /** Query AllAffiliateTiers returns all affiliate tiers. */ + + allAffiliateTiers(request?: AllAffiliateTiersRequest): Promise; +} export class QueryClientImpl implements Query { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; + this.affiliateInfo = this.affiliateInfo.bind(this); + this.referredBy = this.referredBy.bind(this); + this.allAffiliateTiers = this.allAffiliateTiers.bind(this); + } + + affiliateInfo(request: AffiliateInfoRequest): Promise { + const data = AffiliateInfoRequest.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.affiliates.Query", "AffiliateInfo", data); + return promise.then(data => AffiliateInfoResponse.decode(new _m0.Reader(data))); + } + + referredBy(request: ReferredByRequest): Promise { + const data = ReferredByRequest.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.affiliates.Query", "ReferredBy", data); + return promise.then(data => ReferredByResponse.decode(new _m0.Reader(data))); + } + + allAffiliateTiers(request: AllAffiliateTiersRequest = {}): Promise { + const data = AllAffiliateTiersRequest.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.affiliates.Query", "AllAffiliateTiers", data); + return promise.then(data => AllAffiliateTiersResponse.decode(new _m0.Reader(data))); } } export const createRpcQueryExtension = (base: QueryClient) => { const rpc = createProtobufRpcClient(base); const queryService = new QueryClientImpl(rpc); - return {}; + return { + affiliateInfo(request: AffiliateInfoRequest): Promise { + return queryService.affiliateInfo(request); + }, + + referredBy(request: ReferredByRequest): Promise { + return queryService.referredBy(request); + }, + + allAffiliateTiers(request?: AllAffiliateTiersRequest): Promise { + return queryService.allAffiliateTiers(request); + } + + }; }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts index 693da49fc40..1662fc5772d 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts @@ -1 +1,398 @@ -export {} \ No newline at end of file +import { AffiliateTiers, AffiliateTiersSDKType } from "./affiliates"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial } from "../../helpers"; +/** + * AffiliateInfoRequest is the request type for the Query/AffiliateInfo RPC + * method. + */ + +export interface AffiliateInfoRequest { + address: string; +} +/** + * AffiliateInfoRequest is the request type for the Query/AffiliateInfo RPC + * method. + */ + +export interface AffiliateInfoRequestSDKType { + address: string; +} +/** + * AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC + * method. + */ + +export interface AffiliateInfoResponse { + /** The affiliate's tier. */ + tier: number; + /** The affiliate's taker fee share in parts-per-million. */ + + feeSharePpm: number; + /** The affiliate's all-time referred volume in quote quantums. */ + + referredVolume: Uint8Array; + /** The affiliate's currently staked native tokens (in whole coins). */ + + stakedAmount: Uint8Array; +} +/** + * AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC + * method. + */ + +export interface AffiliateInfoResponseSDKType { + /** The affiliate's tier. */ + tier: number; + /** The affiliate's taker fee share in parts-per-million. */ + + fee_share_ppm: number; + /** The affiliate's all-time referred volume in quote quantums. */ + + referred_volume: Uint8Array; + /** The affiliate's currently staked native tokens (in whole coins). */ + + staked_amount: Uint8Array; +} +/** ReferredByRequest is the request type for the Query/ReferredBy RPC method. */ + +export interface ReferredByRequest { + /** The address to query. */ + address: string; +} +/** ReferredByRequest is the request type for the Query/ReferredBy RPC method. */ + +export interface ReferredByRequestSDKType { + /** The address to query. */ + address: string; +} +/** ReferredByResponse is the response type for the Query/ReferredBy RPC method. */ + +export interface ReferredByResponse { + /** The affiliate's address that referred the queried address. */ + affiliateAddress: string; +} +/** ReferredByResponse is the response type for the Query/ReferredBy RPC method. */ + +export interface ReferredByResponseSDKType { + /** The affiliate's address that referred the queried address. */ + affiliate_address: string; +} +/** + * AllAffiliateTiersRequest is the request type for the Query/AllAffiliateTiers + * RPC method. + */ + +export interface AllAffiliateTiersRequest {} +/** + * AllAffiliateTiersRequest is the request type for the Query/AllAffiliateTiers + * RPC method. + */ + +export interface AllAffiliateTiersRequestSDKType {} +/** + * AllAffiliateTiersResponse is the response type for the + * Query/AllAffiliateTiers RPC method. + */ + +export interface AllAffiliateTiersResponse { + /** All affiliate tiers information. */ + tiers?: AffiliateTiers; +} +/** + * AllAffiliateTiersResponse is the response type for the + * Query/AllAffiliateTiers RPC method. + */ + +export interface AllAffiliateTiersResponseSDKType { + /** All affiliate tiers information. */ + tiers?: AffiliateTiersSDKType; +} + +function createBaseAffiliateInfoRequest(): AffiliateInfoRequest { + return { + address: "" + }; +} + +export const AffiliateInfoRequest = { + encode(message: AffiliateInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateInfoRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAffiliateInfoRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): AffiliateInfoRequest { + const message = createBaseAffiliateInfoRequest(); + message.address = object.address ?? ""; + return message; + } + +}; + +function createBaseAffiliateInfoResponse(): AffiliateInfoResponse { + return { + tier: 0, + feeSharePpm: 0, + referredVolume: new Uint8Array(), + stakedAmount: new Uint8Array() + }; +} + +export const AffiliateInfoResponse = { + encode(message: AffiliateInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tier !== 0) { + writer.uint32(8).uint32(message.tier); + } + + if (message.feeSharePpm !== 0) { + writer.uint32(16).uint32(message.feeSharePpm); + } + + if (message.referredVolume.length !== 0) { + writer.uint32(26).bytes(message.referredVolume); + } + + if (message.stakedAmount.length !== 0) { + writer.uint32(34).bytes(message.stakedAmount); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AffiliateInfoResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAffiliateInfoResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.tier = reader.uint32(); + break; + + case 2: + message.feeSharePpm = reader.uint32(); + break; + + case 3: + message.referredVolume = reader.bytes(); + break; + + case 4: + message.stakedAmount = reader.bytes(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): AffiliateInfoResponse { + const message = createBaseAffiliateInfoResponse(); + message.tier = object.tier ?? 0; + message.feeSharePpm = object.feeSharePpm ?? 0; + message.referredVolume = object.referredVolume ?? new Uint8Array(); + message.stakedAmount = object.stakedAmount ?? new Uint8Array(); + return message; + } + +}; + +function createBaseReferredByRequest(): ReferredByRequest { + return { + address: "" + }; +} + +export const ReferredByRequest = { + encode(message: ReferredByRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.address !== "") { + writer.uint32(10).string(message.address); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ReferredByRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseReferredByRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.address = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): ReferredByRequest { + const message = createBaseReferredByRequest(); + message.address = object.address ?? ""; + return message; + } + +}; + +function createBaseReferredByResponse(): ReferredByResponse { + return { + affiliateAddress: "" + }; +} + +export const ReferredByResponse = { + encode(message: ReferredByResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.affiliateAddress !== "") { + writer.uint32(10).string(message.affiliateAddress); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): ReferredByResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseReferredByResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.affiliateAddress = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): ReferredByResponse { + const message = createBaseReferredByResponse(); + message.affiliateAddress = object.affiliateAddress ?? ""; + return message; + } + +}; + +function createBaseAllAffiliateTiersRequest(): AllAffiliateTiersRequest { + return {}; +} + +export const AllAffiliateTiersRequest = { + encode(_: AllAffiliateTiersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AllAffiliateTiersRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAllAffiliateTiersRequest(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(_: DeepPartial): AllAffiliateTiersRequest { + const message = createBaseAllAffiliateTiersRequest(); + return message; + } + +}; + +function createBaseAllAffiliateTiersResponse(): AllAffiliateTiersResponse { + return { + tiers: undefined + }; +} + +export const AllAffiliateTiersResponse = { + encode(message: AllAffiliateTiersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.tiers !== undefined) { + AffiliateTiers.encode(message.tiers, writer.uint32(10).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): AllAffiliateTiersResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseAllAffiliateTiersResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.tiers = AffiliateTiers.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): AllAffiliateTiersResponse { + const message = createBaseAllAffiliateTiersResponse(); + message.tiers = object.tiers !== undefined && object.tiers !== null ? AffiliateTiers.fromPartial(object.tiers) : undefined; + return message; + } + +}; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts new file mode 100644 index 00000000000..3a684ef21c2 --- /dev/null +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts @@ -0,0 +1,34 @@ +import { Rpc } from "../../helpers"; +import * as _m0 from "protobufjs/minimal"; +import { MsgRegisterAffiliate, MsgRegisterAffiliateResponse, MsgUpdateAffiliateTiers, MsgUpdateAffiliateTiersResponse } from "./tx"; +/** Msg defines the Msg service. */ + +export interface Msg { + /** RegisterAffiliate registers a referee-affiliate relationship */ + registerAffiliate(request: MsgRegisterAffiliate): Promise; + /** UpdateAffiliateTiers updates affiliate tiers */ + + updateAffiliateTiers(request: MsgUpdateAffiliateTiers): Promise; +} +export class MsgClientImpl implements Msg { + private readonly rpc: Rpc; + + constructor(rpc: Rpc) { + this.rpc = rpc; + this.registerAffiliate = this.registerAffiliate.bind(this); + this.updateAffiliateTiers = this.updateAffiliateTiers.bind(this); + } + + registerAffiliate(request: MsgRegisterAffiliate): Promise { + const data = MsgRegisterAffiliate.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.affiliates.Msg", "RegisterAffiliate", data); + return promise.then(data => MsgRegisterAffiliateResponse.decode(new _m0.Reader(data))); + } + + updateAffiliateTiers(request: MsgUpdateAffiliateTiers): Promise { + const data = MsgUpdateAffiliateTiers.encode(request).finish(); + const promise = this.rpc.request("dydxprotocol.affiliates.Msg", "UpdateAffiliateTiers", data); + return promise.then(data => MsgUpdateAffiliateTiersResponse.decode(new _m0.Reader(data))); + } + +} \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts index 693da49fc40..48c2c3ea707 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts @@ -1 +1,229 @@ -export {} \ No newline at end of file +import { AffiliateTiers, AffiliateTiersSDKType } from "./affiliates"; +import * as _m0 from "protobufjs/minimal"; +import { DeepPartial } from "../../helpers"; +/** Message to register a referee-affiliate relationship */ + +export interface MsgRegisterAffiliate { + /** Address of the referee */ + referee: string; + /** Address of the affiliate */ + + affiliate: string; +} +/** Message to register a referee-affiliate relationship */ + +export interface MsgRegisterAffiliateSDKType { + /** Address of the referee */ + referee: string; + /** Address of the affiliate */ + + affiliate: string; +} +/** Response to MsgRegisterAffiliate */ + +export interface MsgRegisterAffiliateResponse {} +/** Response to MsgRegisterAffiliate */ + +export interface MsgRegisterAffiliateResponseSDKType {} +/** Message to update affiliate tiers */ + +export interface MsgUpdateAffiliateTiers { + /** Authority sending this message. Will be sent by gov */ + authority: string; + /** Updated affiliate tiers information */ + + tiers?: AffiliateTiers; +} +/** Message to update affiliate tiers */ + +export interface MsgUpdateAffiliateTiersSDKType { + /** Authority sending this message. Will be sent by gov */ + authority: string; + /** Updated affiliate tiers information */ + + tiers?: AffiliateTiersSDKType; +} +/** Response to MsgUpdateAffiliateTiers */ + +export interface MsgUpdateAffiliateTiersResponse {} +/** Response to MsgUpdateAffiliateTiers */ + +export interface MsgUpdateAffiliateTiersResponseSDKType {} + +function createBaseMsgRegisterAffiliate(): MsgRegisterAffiliate { + return { + referee: "", + affiliate: "" + }; +} + +export const MsgRegisterAffiliate = { + encode(message: MsgRegisterAffiliate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.referee !== "") { + writer.uint32(10).string(message.referee); + } + + if (message.affiliate !== "") { + writer.uint32(18).string(message.affiliate); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterAffiliate { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterAffiliate(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.referee = reader.string(); + break; + + case 2: + message.affiliate = reader.string(); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): MsgRegisterAffiliate { + const message = createBaseMsgRegisterAffiliate(); + message.referee = object.referee ?? ""; + message.affiliate = object.affiliate ?? ""; + return message; + } + +}; + +function createBaseMsgRegisterAffiliateResponse(): MsgRegisterAffiliateResponse { + return {}; +} + +export const MsgRegisterAffiliateResponse = { + encode(_: MsgRegisterAffiliateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRegisterAffiliateResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgRegisterAffiliateResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(_: DeepPartial): MsgRegisterAffiliateResponse { + const message = createBaseMsgRegisterAffiliateResponse(); + return message; + } + +}; + +function createBaseMsgUpdateAffiliateTiers(): MsgUpdateAffiliateTiers { + return { + authority: "", + tiers: undefined + }; +} + +export const MsgUpdateAffiliateTiers = { + encode(message: MsgUpdateAffiliateTiers, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.authority !== "") { + writer.uint32(10).string(message.authority); + } + + if (message.tiers !== undefined) { + AffiliateTiers.encode(message.tiers, writer.uint32(18).fork()).ldelim(); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAffiliateTiers { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAffiliateTiers(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.authority = reader.string(); + break; + + case 2: + message.tiers = AffiliateTiers.decode(reader, reader.uint32()); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): MsgUpdateAffiliateTiers { + const message = createBaseMsgUpdateAffiliateTiers(); + message.authority = object.authority ?? ""; + message.tiers = object.tiers !== undefined && object.tiers !== null ? AffiliateTiers.fromPartial(object.tiers) : undefined; + return message; + } + +}; + +function createBaseMsgUpdateAffiliateTiersResponse(): MsgUpdateAffiliateTiersResponse { + return {}; +} + +export const MsgUpdateAffiliateTiersResponse = { + encode(_: MsgUpdateAffiliateTiersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateAffiliateTiersResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseMsgUpdateAffiliateTiersResponse(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(_: DeepPartial): MsgUpdateAffiliateTiersResponse { + const message = createBaseMsgUpdateAffiliateTiersResponse(); + return message; + } + +}; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts index 3b538b90b15..454389df3f2 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts @@ -1,173 +1,175 @@ import * as _5 from "./accountplus/accountplus"; import * as _6 from "./accountplus/genesis"; -import * as _7 from "./affiliates/genesis"; -import * as _8 from "./affiliates/query"; -import * as _9 from "./affiliates/tx"; -import * as _10 from "./assets/asset"; -import * as _11 from "./assets/genesis"; -import * as _12 from "./assets/query"; -import * as _13 from "./assets/tx"; -import * as _14 from "./blocktime/blocktime"; -import * as _15 from "./blocktime/genesis"; -import * as _16 from "./blocktime/params"; -import * as _17 from "./blocktime/query"; -import * as _18 from "./blocktime/tx"; -import * as _19 from "./bridge/bridge_event_info"; -import * as _20 from "./bridge/bridge_event"; -import * as _21 from "./bridge/genesis"; -import * as _22 from "./bridge/params"; -import * as _23 from "./bridge/query"; -import * as _24 from "./bridge/tx"; -import * as _25 from "./clob/block_rate_limit_config"; -import * as _26 from "./clob/clob_pair"; -import * as _27 from "./clob/equity_tier_limit_config"; -import * as _28 from "./clob/genesis"; -import * as _29 from "./clob/liquidations_config"; -import * as _30 from "./clob/liquidations"; -import * as _31 from "./clob/matches"; -import * as _32 from "./clob/mev"; -import * as _33 from "./clob/operation"; -import * as _34 from "./clob/order_removals"; -import * as _35 from "./clob/order"; -import * as _36 from "./clob/process_proposer_matches_events"; -import * as _37 from "./clob/query"; -import * as _38 from "./clob/tx"; -import * as _39 from "./daemons/bridge/bridge"; -import * as _40 from "./daemons/liquidation/liquidation"; -import * as _41 from "./daemons/pricefeed/price_feed"; -import * as _42 from "./delaymsg/block_message_ids"; -import * as _43 from "./delaymsg/delayed_message"; -import * as _44 from "./delaymsg/genesis"; -import * as _45 from "./delaymsg/query"; -import * as _46 from "./delaymsg/tx"; -import * as _47 from "./epochs/epoch_info"; -import * as _48 from "./epochs/genesis"; -import * as _49 from "./epochs/query"; -import * as _50 from "./feetiers/genesis"; -import * as _51 from "./feetiers/params"; -import * as _52 from "./feetiers/query"; -import * as _53 from "./feetiers/tx"; -import * as _54 from "./govplus/genesis"; -import * as _55 from "./govplus/query"; -import * as _56 from "./govplus/tx"; -import * as _57 from "./indexer/events/events"; -import * as _58 from "./indexer/indexer_manager/event"; -import * as _59 from "./indexer/off_chain_updates/off_chain_updates"; -import * as _60 from "./indexer/protocol/v1/clob"; -import * as _61 from "./indexer/protocol/v1/perpetual"; -import * as _62 from "./indexer/protocol/v1/subaccount"; -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 _7 from "./affiliates/affiliates"; +import * as _8 from "./affiliates/genesis"; +import * as _9 from "./affiliates/query"; +import * as _10 from "./affiliates/tx"; +import * as _11 from "./assets/asset"; +import * as _12 from "./assets/genesis"; +import * as _13 from "./assets/query"; +import * as _14 from "./assets/tx"; +import * as _15 from "./blocktime/blocktime"; +import * as _16 from "./blocktime/genesis"; +import * as _17 from "./blocktime/params"; +import * as _18 from "./blocktime/query"; +import * as _19 from "./blocktime/tx"; +import * as _20 from "./bridge/bridge_event_info"; +import * as _21 from "./bridge/bridge_event"; +import * as _22 from "./bridge/genesis"; +import * as _23 from "./bridge/params"; +import * as _24 from "./bridge/query"; +import * as _25 from "./bridge/tx"; +import * as _26 from "./clob/block_rate_limit_config"; +import * as _27 from "./clob/clob_pair"; +import * as _28 from "./clob/equity_tier_limit_config"; +import * as _29 from "./clob/genesis"; +import * as _30 from "./clob/liquidations_config"; +import * as _31 from "./clob/liquidations"; +import * as _32 from "./clob/matches"; +import * as _33 from "./clob/mev"; +import * as _34 from "./clob/operation"; +import * as _35 from "./clob/order_removals"; +import * as _36 from "./clob/order"; +import * as _37 from "./clob/process_proposer_matches_events"; +import * as _38 from "./clob/query"; +import * as _39 from "./clob/tx"; +import * as _40 from "./daemons/bridge/bridge"; +import * as _41 from "./daemons/liquidation/liquidation"; +import * as _42 from "./daemons/pricefeed/price_feed"; +import * as _43 from "./delaymsg/block_message_ids"; +import * as _44 from "./delaymsg/delayed_message"; +import * as _45 from "./delaymsg/genesis"; +import * as _46 from "./delaymsg/query"; +import * as _47 from "./delaymsg/tx"; +import * as _48 from "./epochs/epoch_info"; +import * as _49 from "./epochs/genesis"; +import * as _50 from "./epochs/query"; +import * as _51 from "./feetiers/genesis"; +import * as _52 from "./feetiers/params"; +import * as _53 from "./feetiers/query"; +import * as _54 from "./feetiers/tx"; +import * as _55 from "./govplus/genesis"; +import * as _56 from "./govplus/query"; +import * as _57 from "./govplus/tx"; +import * as _58 from "./indexer/events/events"; +import * as _59 from "./indexer/indexer_manager/event"; +import * as _60 from "./indexer/off_chain_updates/off_chain_updates"; +import * as _61 from "./indexer/protocol/v1/clob"; +import * as _62 from "./indexer/protocol/v1/perpetual"; +import * as _63 from "./indexer/protocol/v1/subaccount"; +import * as _64 from "./indexer/redis/redis_order"; +import * as _65 from "./indexer/shared/removal_reason"; +import * as _66 from "./indexer/socks/messages"; +import * as _67 from "./listing/genesis"; +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 "./affiliates/tx.rpc.msg"; +import * as _165 from "./blocktime/tx.rpc.msg"; +import * as _166 from "./bridge/tx.rpc.msg"; +import * as _167 from "./clob/tx.rpc.msg"; +import * as _168 from "./delaymsg/tx.rpc.msg"; +import * as _169 from "./feetiers/tx.rpc.msg"; +import * as _170 from "./govplus/tx.rpc.msg"; +import * as _171 from "./listing/tx.rpc.msg"; +import * as _172 from "./perpetuals/tx.rpc.msg"; +import * as _173 from "./prices/tx.rpc.msg"; +import * as _174 from "./ratelimit/tx.rpc.msg"; +import * as _175 from "./revshare/tx.rpc.msg"; +import * as _176 from "./rewards/tx.rpc.msg"; +import * as _177 from "./sending/tx.rpc.msg"; +import * as _178 from "./stats/tx.rpc.msg"; +import * as _179 from "./vault/tx.rpc.msg"; +import * as _180 from "./vest/tx.rpc.msg"; +import * as _181 from "./lcd"; +import * as _182 from "./rpc.query"; +import * as _183 from "./rpc.tx"; export namespace dydxprotocol { export const accountplus = { ..._5, ..._6 @@ -175,36 +177,37 @@ export namespace dydxprotocol { export const affiliates = { ..._7, ..._8, ..._9, - ..._143 + ..._10, + ..._144, + ..._164 }; - export const assets = { ..._10, - ..._11, + export const assets = { ..._11, ..._12, ..._13, - ..._127, - ..._144 + ..._14, + ..._128, + ..._145 }; - export const blocktime = { ..._14, - ..._15, + export const blocktime = { ..._15, ..._16, ..._17, ..._18, - ..._128, - ..._145, - ..._163 + ..._19, + ..._129, + ..._146, + ..._165 }; - export const bridge = { ..._19, - ..._20, + export const bridge = { ..._20, ..._21, ..._22, ..._23, ..._24, - ..._129, - ..._146, - ..._164 + ..._25, + ..._130, + ..._147, + ..._166 }; - export const clob = { ..._25, - ..._26, + export const clob = { ..._26, ..._27, ..._28, ..._29, @@ -217,164 +220,165 @@ export namespace dydxprotocol { ..._36, ..._37, ..._38, - ..._130, - ..._147, - ..._165 + ..._39, + ..._131, + ..._148, + ..._167 }; export namespace daemons { - export const bridge = { ..._39 + export const bridge = { ..._40 }; - export const liquidation = { ..._40 + export const liquidation = { ..._41 }; - export const pricefeed = { ..._41 + export const pricefeed = { ..._42 }; } - export const delaymsg = { ..._42, - ..._43, + export const delaymsg = { ..._43, ..._44, ..._45, ..._46, - ..._131, - ..._148, - ..._166 + ..._47, + ..._132, + ..._149, + ..._168 }; - export const epochs = { ..._47, - ..._48, + export const epochs = { ..._48, ..._49, - ..._132, - ..._149 + ..._50, + ..._133, + ..._150 }; - export const feetiers = { ..._50, - ..._51, + export const feetiers = { ..._51, ..._52, ..._53, - ..._133, - ..._150, - ..._167 + ..._54, + ..._134, + ..._151, + ..._169 }; - export const govplus = { ..._54, - ..._55, + export const govplus = { ..._55, ..._56, - ..._151, - ..._168 + ..._57, + ..._152, + ..._170 }; export namespace indexer { - export const events = { ..._57 + export const events = { ..._58 }; - export const indexer_manager = { ..._58 + export const indexer_manager = { ..._59 }; - export const off_chain_updates = { ..._59 + export const off_chain_updates = { ..._60 }; export namespace protocol { - export const v1 = { ..._60, - ..._61, - ..._62 + export const v1 = { ..._61, + ..._62, + ..._63 }; } - export const redis = { ..._63 + export const redis = { ..._64 }; - export const shared = { ..._64 + export const shared = { ..._65 }; - export const socks = { ..._65 + export const socks = { ..._66 }; } - export const listing = { ..._66, - ..._67, + export const listing = { ..._67, ..._68, - ..._152, - ..._169 + ..._69, + ..._153, + ..._171 }; - export const perpetuals = { ..._69, - ..._70, + export const perpetuals = { ..._70, ..._71, ..._72, ..._73, - ..._134, - ..._153, - ..._170 + ..._74, + ..._135, + ..._154, + ..._172 }; - export const prices = { ..._74, - ..._75, + export const prices = { ..._75, ..._76, ..._77, ..._78, - ..._135, - ..._154, - ..._171 + ..._79, + ..._136, + ..._155, + ..._173 }; - export const ratelimit = { ..._79, - ..._80, + export const ratelimit = { ..._80, ..._81, ..._82, ..._83, ..._84, - ..._136, - ..._155, - ..._172 + ..._85, + ..._137, + ..._156, + ..._174 }; - export const revshare = { ..._85, - ..._86, + export const revshare = { ..._86, ..._87, ..._88, ..._89, - ..._137, - ..._156, - ..._173 + ..._90, + ..._138, + ..._157, + ..._175 }; - export const rewards = { ..._90, - ..._91, + export const rewards = { ..._91, ..._92, ..._93, ..._94, - ..._138, - ..._157, - ..._174 + ..._95, + ..._139, + ..._158, + ..._176 }; - export const sending = { ..._95, - ..._96, + export const sending = { ..._96, ..._97, ..._98, - ..._158, - ..._175 + ..._99, + ..._159, + ..._177 }; - export const stats = { ..._99, - ..._100, + export const stats = { ..._100, ..._101, ..._102, ..._103, - ..._139, - ..._159, - ..._176 + ..._104, + ..._140, + ..._160, + ..._178 }; - 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 + ..._116, + ..._142, + ..._162, + ..._179 }; - export const vest = { ..._116, - ..._117, + export const vest = { ..._117, ..._118, ..._119, - ..._142, - ..._162, - ..._178 + ..._120, + ..._143, + ..._163, + ..._180 }; - export const ClientFactory = { ..._179, - ..._180, - ..._181 + export const ClientFactory = { ..._181, + ..._182, + ..._183 }; } \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts index 81bf3763295..1cbb016b6b3 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts @@ -415,6 +415,9 @@ export interface OrderFillEventV1 { /** Total filled of the taker order in base quantums. */ totalFilledTaker: Long; + /** rev share for affiliates in USDC quantums. */ + + affiliateRevShare: Long; } /** * OrderFillEvent message contains all the information from an order match in @@ -444,6 +447,9 @@ export interface OrderFillEventV1SDKType { /** Total filled of the taker order in base quantums. */ total_filled_taker: Long; + /** rev share for affiliates in USDC quantums. */ + + affiliate_rev_share: Long; } /** * DeleveragingEvent message contains all the information for a deleveraging @@ -1479,6 +1485,30 @@ export interface LiquidityTierUpsertEventV2SDKType { open_interest_upper_cap: Long; } +/** Event emiited when a referee is registered with an affiliate. */ + +export interface RegisterAffiliateEventV1 { + /** Address of the referee being registered. */ + referee: string; + /** Address of the affiliate associated with the referee. */ + + affiliate: string; + /** Block number at which the affiliate was registered. */ + + registeredAtBlock: Long; +} +/** Event emiited when a referee is registered with an affiliate. */ + +export interface RegisterAffiliateEventV1SDKType { + /** Address of the referee being registered. */ + referee: string; + /** Address of the affiliate associated with the referee. */ + + affiliate: string; + /** Block number at which the affiliate was registered. */ + + registered_at_block: Long; +} function createBaseFundingUpdateV1(): FundingUpdateV1 { return { @@ -2034,7 +2064,8 @@ function createBaseOrderFillEventV1(): OrderFillEventV1 { makerFee: Long.ZERO, takerFee: Long.ZERO, totalFilledMaker: Long.UZERO, - totalFilledTaker: Long.UZERO + totalFilledTaker: Long.UZERO, + affiliateRevShare: Long.UZERO }; } @@ -2072,6 +2103,10 @@ export const OrderFillEventV1 = { writer.uint32(64).uint64(message.totalFilledTaker); } + if (!message.affiliateRevShare.isZero()) { + writer.uint32(72).uint64(message.affiliateRevShare); + } + return writer; }, @@ -2116,6 +2151,10 @@ export const OrderFillEventV1 = { message.totalFilledTaker = (reader.uint64() as Long); break; + case 9: + message.affiliateRevShare = (reader.uint64() as Long); + break; + default: reader.skipType(tag & 7); break; @@ -2135,6 +2174,7 @@ export const OrderFillEventV1 = { message.takerFee = object.takerFee !== undefined && object.takerFee !== null ? Long.fromValue(object.takerFee) : Long.ZERO; message.totalFilledMaker = object.totalFilledMaker !== undefined && object.totalFilledMaker !== null ? Long.fromValue(object.totalFilledMaker) : Long.UZERO; message.totalFilledTaker = object.totalFilledTaker !== undefined && object.totalFilledTaker !== null ? Long.fromValue(object.totalFilledTaker) : Long.UZERO; + message.affiliateRevShare = object.affiliateRevShare !== undefined && object.affiliateRevShare !== null ? Long.fromValue(object.affiliateRevShare) : Long.UZERO; return message; } @@ -3713,4 +3753,69 @@ export const LiquidityTierUpsertEventV2 = { return message; } +}; + +function createBaseRegisterAffiliateEventV1(): RegisterAffiliateEventV1 { + return { + referee: "", + affiliate: "", + registeredAtBlock: Long.UZERO + }; +} + +export const RegisterAffiliateEventV1 = { + encode(message: RegisterAffiliateEventV1, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.referee !== "") { + writer.uint32(10).string(message.referee); + } + + if (message.affiliate !== "") { + writer.uint32(18).string(message.affiliate); + } + + if (!message.registeredAtBlock.isZero()) { + writer.uint32(24).uint64(message.registeredAtBlock); + } + + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): RegisterAffiliateEventV1 { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseRegisterAffiliateEventV1(); + + while (reader.pos < end) { + const tag = reader.uint32(); + + switch (tag >>> 3) { + case 1: + message.referee = reader.string(); + break; + + case 2: + message.affiliate = reader.string(); + break; + + case 3: + message.registeredAtBlock = (reader.uint64() as Long); + break; + + default: + reader.skipType(tag & 7); + break; + } + } + + return message; + }, + + fromPartial(object: DeepPartial): RegisterAffiliateEventV1 { + const message = createBaseRegisterAffiliateEventV1(); + message.referee = object.referee ?? ""; + message.affiliate = object.affiliate ?? ""; + message.registeredAtBlock = object.registeredAtBlock !== undefined && object.registeredAtBlock !== null ? Long.fromValue(object.registeredAtBlock) : Long.UZERO; + return message; + } + }; \ No newline at end of file diff --git a/indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts b/indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts index 64a0428be05..1c3eedfabc7 100644 --- a/indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts +++ b/indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts @@ -5,6 +5,7 @@ export const createRPCMsgClient = async ({ rpc: Rpc; }) => ({ dydxprotocol: { + affiliates: new (await import("./affiliates/tx.rpc.msg")).MsgClientImpl(rpc), blocktime: new (await import("./blocktime/tx.rpc.msg")).MsgClientImpl(rpc), bridge: new (await import("./bridge/tx.rpc.msg")).MsgClientImpl(rpc), clob: new (await import("./clob/tx.rpc.msg")).MsgClientImpl(rpc), diff --git a/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts b/indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts index 3901c34d08e..0acccb5b70f 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 b1100523419..e82b3d82908 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/affiliates/affiliates.proto b/proto/dydxprotocol/affiliates/affiliates.proto new file mode 100644 index 00000000000..66b6e74cb4e --- /dev/null +++ b/proto/dydxprotocol/affiliates/affiliates.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package dydxprotocol.affiliates; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/affiliates/types"; + +// AffiliateTiers defines the affiliate tiers. +message AffiliateTiers { + // Tier defines an affiliate tier. + message Tier { + // Level of the tier + uint32 level = 1; + // Required all-time referred volume in quote quantums. + uint64 req_referred_volume = 2; + // Required currently staked native tokens (in whole coins). + uint32 req_staked_whole_coins = 3; + // Taker fee share in parts-per-million. + uint32 taker_fee_share_ppm = 4; + } + // All affiliate tiers + repeated Tier tiers = 1 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/dydxprotocol/affiliates/query.proto b/proto/dydxprotocol/affiliates/query.proto index 0b0e7208adb..21d81e2bb29 100644 --- a/proto/dydxprotocol/affiliates/query.proto +++ b/proto/dydxprotocol/affiliates/query.proto @@ -1,7 +1,68 @@ syntax = "proto3"; package dydxprotocol.affiliates; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "dydxprotocol/affiliates/affiliates.proto"; + option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/affiliates/types"; // Query defines the gRPC querier service. -service Query {} \ No newline at end of file +service Query { + // Query AffiliateInfo returns the affiliate info for a given address. + rpc AffiliateInfo(AffiliateInfoRequest) returns (AffiliateInfoResponse); + // Query ReferredBy returns the affiliate that referred a given address. + rpc ReferredBy(ReferredByRequest) returns (ReferredByResponse); + // Query AllAffiliateTiers returns all affiliate tiers. + rpc AllAffiliateTiers(AllAffiliateTiersRequest) + returns (AllAffiliateTiersResponse); +} +// AffiliateInfoRequest is the request type for the Query/AffiliateInfo RPC +// method. +message AffiliateInfoRequest { + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC +// method. +message AffiliateInfoResponse { + // The affiliate's tier. + uint32 tier = 1; + // The affiliate's taker fee share in parts-per-million. + uint32 fee_share_ppm = 2; + // The affiliate's all-time referred volume in quote quantums. + bytes referred_volume = 3 [ + (gogoproto.customtype) = + "github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt", + (gogoproto.nullable) = false + ]; + // The affiliate's currently staked native tokens (in whole coins). + bytes staked_amount = 4 [ + (gogoproto.customtype) = + "github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt", + (gogoproto.nullable) = false + ]; +} + +// ReferredByRequest is the request type for the Query/ReferredBy RPC method. +message ReferredByRequest { + // The address to query. + string address = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} +// ReferredByResponse is the response type for the Query/ReferredBy RPC method. +message ReferredByResponse { + // The affiliate's address that referred the queried address. + string affiliate_address = 1 + [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// AllAffiliateTiersRequest is the request type for the Query/AllAffiliateTiers +// RPC method. +message AllAffiliateTiersRequest {} + +// AllAffiliateTiersResponse is the response type for the +// Query/AllAffiliateTiers RPC method. +message AllAffiliateTiersResponse { + // All affiliate tiers information. + AffiliateTiers tiers = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/dydxprotocol/affiliates/tx.proto b/proto/dydxprotocol/affiliates/tx.proto index 6cb68f8418c..99d7940d1e5 100644 --- a/proto/dydxprotocol/affiliates/tx.proto +++ b/proto/dydxprotocol/affiliates/tx.proto @@ -1,7 +1,46 @@ syntax = "proto3"; package dydxprotocol.affiliates; +import "cosmos_proto/cosmos.proto"; +import "gogoproto/gogo.proto"; +import "dydxprotocol/affiliates/affiliates.proto"; +import "cosmos/msg/v1/msg.proto"; + option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/affiliates/types"; // Msg defines the Msg service. -service Msg {} \ No newline at end of file +service Msg { + // RegisterAffiliate registers a referee-affiliate relationship + rpc RegisterAffiliate(MsgRegisterAffiliate) + returns (MsgRegisterAffiliateResponse); + // UpdateAffiliateTiers updates affiliate tiers + rpc UpdateAffiliateTiers(MsgUpdateAffiliateTiers) + returns (MsgUpdateAffiliateTiersResponse); +} + +// Message to register a referee-affiliate relationship +message MsgRegisterAffiliate { + option (cosmos.msg.v1.signer) = "referee"; + + option (gogoproto.equal) = false; + option (gogoproto.goproto_getters) = false; + // Address of the referee + string referee = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Address of the affiliate + string affiliate = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// Response to MsgRegisterAffiliate +message MsgRegisterAffiliateResponse {} + +// Message to update affiliate tiers +message MsgUpdateAffiliateTiers { + option (cosmos.msg.v1.signer) = "authority"; + // Authority sending this message. Will be sent by gov + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Updated affiliate tiers information + AffiliateTiers tiers = 2; +} + +// Response to MsgUpdateAffiliateTiers +message MsgUpdateAffiliateTiersResponse {} \ No newline at end of file diff --git a/proto/dydxprotocol/indexer/events/events.proto b/proto/dydxprotocol/indexer/events/events.proto index 2b6b1eec7e2..54a40baf555 100644 --- a/proto/dydxprotocol/indexer/events/events.proto +++ b/proto/dydxprotocol/indexer/events/events.proto @@ -164,6 +164,8 @@ message OrderFillEventV1 { uint64 total_filled_maker = 7; // Total filled of the taker order in base quantums. uint64 total_filled_taker = 8; + // rev share for affiliates in USDC quantums. + uint64 affiliate_rev_share = 9; } // DeleveragingEvent message contains all the information for a deleveraging @@ -580,3 +582,13 @@ message LiquidityTierUpsertEventV2 { // Upper cap of open interest in quote quantums. uint64 open_interest_upper_cap = 7; } + +// Event emiited when a referee is registered with an affiliate. +message RegisterAffiliateEventV1 { + // Address of the referee being registered. + string referee = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Address of the affiliate associated with the referee. + string affiliate = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Block number at which the affiliate was registered. + uint64 registered_at_block = 3; +} \ No newline at end of file diff --git a/protocol/indexer/events/events.pb.go b/protocol/indexer/events/events.pb.go index 61d702ee01c..f66e0ed665e 100644 --- a/protocol/indexer/events/events.pb.go +++ b/protocol/indexer/events/events.pb.go @@ -721,6 +721,8 @@ type OrderFillEventV1 struct { TotalFilledMaker uint64 `protobuf:"varint,7,opt,name=total_filled_maker,json=totalFilledMaker,proto3" json:"total_filled_maker,omitempty"` // Total filled of the taker order in base quantums. TotalFilledTaker uint64 `protobuf:"varint,8,opt,name=total_filled_taker,json=totalFilledTaker,proto3" json:"total_filled_taker,omitempty"` + // rev share for affiliates in USDC quantums. + AffiliateRevShare uint64 `protobuf:"varint,9,opt,name=affiliate_rev_share,json=affiliateRevShare,proto3" json:"affiliate_rev_share,omitempty"` } func (m *OrderFillEventV1) Reset() { *m = OrderFillEventV1{} } @@ -835,6 +837,13 @@ func (m *OrderFillEventV1) GetTotalFilledTaker() uint64 { return 0 } +func (m *OrderFillEventV1) GetAffiliateRevShare() uint64 { + if m != nil { + return m.AffiliateRevShare + } + return 0 +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*OrderFillEventV1) XXX_OneofWrappers() []interface{} { return []interface{}{ @@ -2536,6 +2545,70 @@ func (m *LiquidityTierUpsertEventV2) GetOpenInterestUpperCap() uint64 { return 0 } +// Event emiited when a referee is registered with an affiliate. +type RegisterAffiliateEventV1 struct { + // Address of the referee being registered. + Referee string `protobuf:"bytes,1,opt,name=referee,proto3" json:"referee,omitempty"` + // Address of the affiliate associated with the referee. + Affiliate string `protobuf:"bytes,2,opt,name=affiliate,proto3" json:"affiliate,omitempty"` + // Block number at which the affiliate was registered. + RegisteredAtBlock uint64 `protobuf:"varint,3,opt,name=registered_at_block,json=registeredAtBlock,proto3" json:"registered_at_block,omitempty"` +} + +func (m *RegisterAffiliateEventV1) Reset() { *m = RegisterAffiliateEventV1{} } +func (m *RegisterAffiliateEventV1) String() string { return proto.CompactTextString(m) } +func (*RegisterAffiliateEventV1) ProtoMessage() {} +func (*RegisterAffiliateEventV1) Descriptor() ([]byte, []int) { + return fileDescriptor_6331dfb59c6fd2bb, []int{25} +} +func (m *RegisterAffiliateEventV1) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RegisterAffiliateEventV1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RegisterAffiliateEventV1.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 *RegisterAffiliateEventV1) XXX_Merge(src proto.Message) { + xxx_messageInfo_RegisterAffiliateEventV1.Merge(m, src) +} +func (m *RegisterAffiliateEventV1) XXX_Size() int { + return m.Size() +} +func (m *RegisterAffiliateEventV1) XXX_DiscardUnknown() { + xxx_messageInfo_RegisterAffiliateEventV1.DiscardUnknown(m) +} + +var xxx_messageInfo_RegisterAffiliateEventV1 proto.InternalMessageInfo + +func (m *RegisterAffiliateEventV1) GetReferee() string { + if m != nil { + return m.Referee + } + return "" +} + +func (m *RegisterAffiliateEventV1) GetAffiliate() string { + if m != nil { + return m.Affiliate + } + return "" +} + +func (m *RegisterAffiliateEventV1) GetRegisteredAtBlock() uint64 { + if m != nil { + return m.RegisteredAtBlock + } + return 0 +} + func init() { proto.RegisterEnum("dydxprotocol.indexer.events.FundingEventV1_Type", FundingEventV1_Type_name, FundingEventV1_Type_value) proto.RegisterType((*FundingUpdateV1)(nil), "dydxprotocol.indexer.events.FundingUpdateV1") @@ -2569,6 +2642,7 @@ func init() { proto.RegisterType((*OpenInterestUpdateEventV1)(nil), "dydxprotocol.indexer.events.OpenInterestUpdateEventV1") proto.RegisterType((*OpenInterestUpdate)(nil), "dydxprotocol.indexer.events.OpenInterestUpdate") proto.RegisterType((*LiquidityTierUpsertEventV2)(nil), "dydxprotocol.indexer.events.LiquidityTierUpsertEventV2") + proto.RegisterType((*RegisterAffiliateEventV1)(nil), "dydxprotocol.indexer.events.RegisterAffiliateEventV1") } func init() { @@ -2576,153 +2650,158 @@ func init() { } var fileDescriptor_6331dfb59c6fd2bb = []byte{ - // 2322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x23, 0x49, - 0x15, 0x4f, 0xdb, 0x8e, 0xe3, 0x3c, 0xc7, 0x19, 0xbb, 0xc6, 0xc9, 0x38, 0x09, 0x64, 0x86, 0x96, - 0x90, 0x46, 0xfb, 0xe1, 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0x1d, 0x98, 0xc2, 0xb6, 0x1d, 0x12, 0xc6, 0xc4, 0x2a, 0xa7, 0x6b, 0x95, 0xbf, 0xfe, 0xfe, 0xed, - 0xb2, 0xba, 0x12, 0xd6, 0x25, 0xe7, 0x30, 0x0a, 0xa9, 0xd7, 0xdc, 0x99, 0x30, 0xe2, 0xa9, 0xb5, - 0x1c, 0x64, 0x99, 0x30, 0x52, 0xff, 0x4d, 0x1a, 0x6e, 0x1c, 0x85, 0xd8, 0x63, 0xa7, 0x24, 0x8c, - 0xfd, 0xd0, 0x84, 0x32, 0x23, 0x9e, 0x4d, 0x42, 0xf3, 0xfa, 0x0c, 0x37, 0x90, 0x84, 0xec, 0xa4, - 0x21, 0x17, 0x6e, 0x85, 0xc4, 0xa2, 0x01, 0x25, 0x5e, 0xd4, 0xa3, 0x2b, 0x75, 0x15, 0x5d, 0x73, - 0x09, 0x6a, 0x97, 0xba, 0x05, 0xc8, 0x61, 0xc6, 0xe4, 0x31, 0x92, 0x16, 0x29, 0x39, 0x25, 0xc6, - 0x75, 0x1b, 0xcd, 0x43, 0x16, 0xbb, 0x7c, 0x9a, 0xd8, 0x89, 0x19, 0x43, 0x8d, 0x50, 0x0d, 0xb2, - 0xd2, 0xee, 0xca, 0xa4, 0x30, 0xe8, 0x8d, 0x91, 0x49, 0xd1, 0x15, 0x78, 0x43, 0x49, 0xa2, 0x1d, - 0x98, 0x4e, 0xec, 0xa9, 0x64, 0x5f, 0x19, 0xa6, 0x2d, 0xac, 0xff, 0x2d, 0x0d, 0xc5, 0xfb, 0xa1, - 0x4d, 0xc2, 0x6d, 0xea, 0x38, 0x71, 0xb4, 0x8e, 0x21, 0xef, 0xe2, 0x73, 0x12, 0x9a, 0x3e, 0xe7, - 0x8c, 0x4e, 0xde, 0x01, 0x8e, 0x13, 0x78, 0xea, 0xe2, 0x00, 0x01, 0x24, 0x28, 0x68, 0x1b, 0x26, - 0x25, 0x60, 0xea, 0x75, 0x00, 0x77, 0x26, 0x0c, 0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 0x15, 0x0d, 0x30, 0xda, 0x88, 0xf2, 0xc6, - 0xf7, 0x7b, 0xa8, 0x8b, 0xdf, 0x81, 0xca, 0xb0, 0x4c, 0x46, 0x9b, 0x71, 0xd5, 0xf2, 0x5a, 0x65, - 0x90, 0xaa, 0x59, 0x16, 0xff, 0xa8, 0xc1, 0xfc, 0xe0, 0xbc, 0x45, 0x0f, 0xa1, 0x28, 0xb6, 0x04, - 0xb1, 0x55, 0x00, 0x92, 0x53, 0xef, 0xde, 0xab, 0xe9, 0xaa, 0xdb, 0xc6, 0xac, 0x42, 0x52, 0x63, - 0xf4, 0x01, 0x64, 0x65, 0x0f, 0x46, 0x3d, 0xd8, 0x87, 0xd4, 0x47, 0xb2, 0x6d, 0x53, 0xed, 0x34, - 0xcc, 0x10, 0x62, 0x86, 0x12, 0x5f, 0xb4, 0x60, 0x69, 0x44, 0xda, 0x5f, 0x93, 0x93, 0xbe, 0xd7, - 0xaf, 0xa4, 0x23, 0x93, 0xd1, 0xa7, 0x80, 0x92, 0xbd, 0x72, 0x75, 0x57, 0x15, 0x13, 0x2c, 0x45, - 0xe1, 0x59, 0x30, 0x2c, 0x71, 0xaf, 0x69, 0x81, 0x7f, 0xd0, 0x60, 0x71, 0x78, 0x6a, 0x22, 0x03, - 0x66, 0x7c, 0xe7, 0x1a, 0x96, 0x06, 0xbe, 0x93, 0x64, 0xc0, 0xe6, 0x95, 0x8a, 0x6e, 0x65, 0x78, - 0xd2, 0x04, 0x90, 0xf7, 0xca, 0x6e, 0x26, 0x97, 0x2e, 0x66, 0xf4, 0x5f, 0x69, 0x80, 0xc4, 0xb5, - 0xd3, 0xfd, 0xd4, 0x9e, 0x85, 0x54, 0xd2, 0x54, 0x49, 0x51, 0xf1, 0x10, 0x62, 0x97, 0xee, 0x89, - 0xef, 0xc8, 0xe7, 0xa4, 0xa1, 0x46, 0xbc, 0xb0, 0x38, 0xc3, 0xcc, 0x94, 0xcd, 0x06, 0x51, 0x79, - 0xe4, 0x8c, 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35, 0xd3, 0x69, 0xaf, 0xfe, 0x6c, 0xd4, 0x99, 0xb9, 0xf6, 0xbf, 0x71, 0x66, 0xa2, - 0x77, 0x61, 0xd8, 0x49, 0xa9, 0xfa, 0x51, 0xe5, 0x4e, 0x9f, 0xec, 0x71, 0xe6, 0x06, 0x0e, 0xfa, - 0xc5, 0x92, 0x73, 0x54, 0x75, 0x69, 0xcb, 0xdd, 0xa1, 0x0f, 0x84, 0x58, 0xcd, 0xf8, 0xec, 0xf9, - 0xb2, 0xf6, 0xec, 0xf9, 0xb2, 0xf6, 0xaf, 0xe7, 0xcb, 0xda, 0x4f, 0x5e, 0x2c, 0x4f, 0x3c, 0x7b, - 0xb1, 0x3c, 0xf1, 0xf7, 0x17, 0xcb, 0x13, 0x0f, 0xdf, 0x1b, 0x3f, 0x78, 0xdd, 0x1f, 0xef, 0x4f, - 0xb2, 0x82, 0xf1, 0xb5, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xa5, 0x55, 0x11, 0xe2, 0x1f, - 0x00, 0x00, + // 2416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x5a, 0xcd, 0x6f, 0x24, 0x47, + 0x15, 0x77, 0xcf, 0x8c, 0xc7, 0xe3, 0x37, 0x1e, 0xef, 0x4c, 0x79, 0xec, 0x1d, 0xdb, 0xb0, 0xbb, + 0xb4, 0x84, 0xb4, 0xca, 0xc7, 0x78, 0x6d, 0x92, 0x28, 0xca, 0x01, 0xe1, 0xf1, 0x47, 0x3c, 0x96, + 0xed, 0x9d, 0xb4, 0xed, 0x4d, 0xb2, 0xa0, 0x34, 0xe5, 0xee, 0x9a, 0x71, 0xc9, 0xfd, 0xb5, 0x5d, + 0x3d, 0xde, 0x78, 0x11, 0x12, 0xb7, 0x70, 0x40, 0x02, 0x09, 0x71, 0xe0, 0x80, 0xc4, 0x05, 0x0e, + 0x48, 0x1c, 0x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x7b, 0xac, 0x49, 0xc2, + 0xd8, 0x0f, 0x2d, 0x28, 0x33, 0xe2, 0xd9, 0x24, 0x34, 0x6f, 0xce, 0x70, 0x03, 0x49, 0xc8, 0x6e, + 0x1a, 0x72, 0xe1, 0x76, 0x48, 0x2c, 0x1a, 0x50, 0xe2, 0x45, 0x7d, 0xba, 0x52, 0xd7, 0xd1, 0xb5, + 0x98, 0xa0, 0xf6, 0xa8, 0x5b, 0x86, 0x1c, 0x66, 0x4c, 0x1e, 0x23, 0x69, 0x91, 0x92, 0x33, 0x62, + 0x5c, 0xb7, 0xd1, 0x12, 0x64, 0xb1, 0xcb, 0xa7, 0x89, 0x9d, 0x98, 0x31, 0xd4, 0x08, 0xd5, 0x20, + 0x2b, 0xed, 0xae, 0x4c, 0x0b, 0x83, 0x5e, 0x1a, 0x9b, 0x14, 0x3d, 0x81, 0x37, 0x94, 0x24, 0xda, + 0x83, 0xd9, 0xc4, 0x9e, 0x4a, 0xf6, 0x85, 0x61, 0x3a, 0xc2, 0xfa, 0x47, 0x19, 0x28, 0x3e, 0x0c, + 0x6d, 0x12, 0xee, 0x52, 0xc7, 0x89, 0xa3, 0x75, 0x0a, 0x79, 0x17, 0x5f, 0x90, 0xd0, 0xf4, 0x39, + 0x67, 0x7c, 0xf2, 0x0e, 0x71, 0x9c, 0xc0, 0x53, 0x17, 0x07, 0x08, 0x20, 0x41, 0x41, 0xbb, 0x30, + 0x2d, 0x01, 0x53, 0x5f, 0x06, 0x70, 0x6f, 0xca, 0x90, 0xe2, 0xe8, 0x03, 0x28, 0x39, 0xf4, 0x49, + 0x9b, 0xda, 0x38, 0xa2, 0xbe, 0xa7, 0x8c, 0x94, 0xc7, 0xdd, 0xda, 0x58, 0x2f, 0x1c, 0x74, 0xa4, + 0x04, 0xa4, 0x38, 0xed, 0x8a, 0x4e, 0x1f, 0x15, 0xdd, 0x85, 0x7c, 0x93, 0x3a, 0x8e, 0xa9, 0xc2, + 0x97, 0x16, 0xe1, 0x03, 0x4e, 0xda, 0x94, 0x21, 0x14, 0xb7, 0x07, 0xf7, 0x4f, 0x93, 0x10, 0x11, + 0x45, 0xc4, 0x6f, 0x8f, 0x0b, 0x12, 0xee, 0x12, 0xc2, 0x99, 0x51, 0xc2, 0xcc, 0x4a, 0x66, 0x14, + 0x33, 0x5f, 0x01, 0x14, 0xf9, 0x11, 0x76, 0x4c, 0x8e, 0x46, 0x6c, 0x53, 0x48, 0x55, 0x66, 0x84, + 0x86, 0xa2, 0xe0, 0xec, 0x0a, 0xc6, 0x21, 0xa7, 0x0f, 0xcc, 0x16, 0x30, 0x95, 0xdc, 0xc0, 0xec, + 0x13, 0x31, 0xbb, 0x0a, 0x0b, 0xb8, 0xd9, 0xa4, 0x0e, 0xc5, 0x11, 0x31, 0x43, 0x72, 0x69, 0x8a, + 0x62, 0xac, 0x32, 0x2b, 0xcf, 0xe0, 0x84, 0x65, 0x90, 0xcb, 0x63, 0xce, 0xa8, 0x15, 0x20, 0x1f, + 0x75, 0xa2, 0xac, 0xff, 0x24, 0x0d, 0x0b, 0xdb, 0xc4, 0x21, 0x97, 0x24, 0xc4, 0xad, 0xae, 0xfa, + 0xe1, 0xbb, 0x00, 0xb1, 0x87, 0xc8, 0xf5, 0x36, 0x6c, 0x9c, 0x12, 0x1d, 0x38, 0x0e, 0xee, 0x37, + 0x9b, 0x8c, 0x44, 0x11, 0xf5, 0x5a, 0xd7, 0xda, 0xa1, 0x31, 0x78, 0x07, 0x6e, 0xa0, 0x94, 0x4b, + 0x0f, 0x96, 0x72, 0x7d, 0xa1, 0xce, 0x0c, 0x84, 0xfa, 0x01, 0x94, 0x65, 0x08, 0x9e, 0xb4, 0xfd, + 0x88, 0x98, 0x4f, 0xda, 0xd8, 0x8b, 0xda, 0x2e, 0x13, 0x51, 0xcf, 0x18, 0x32, 0x3c, 0xef, 0x70, + 0xd6, 0x3b, 0x8a, 0x83, 0x16, 0x21, 0x4b, 0x99, 0x79, 0xd6, 0xbe, 0x12, 0xc1, 0xcf, 0x19, 0xd3, + 0x94, 0xd5, 0xda, 0x57, 0x3c, 0x3a, 0x94, 0x99, 0x4d, 0xea, 0x61, 0xc7, 0xe4, 0x06, 0x3a, 0xc4, + 0xe5, 0x9b, 0x77, 0x46, 0xcc, 0x29, 0x51, 0xb6, 0xcb, 0x39, 0xc7, 0x09, 0x43, 0xff, 0x71, 0x0a, + 0xd0, 0x60, 0xbe, 0x7e, 0xb5, 0xd1, 0xb8, 0x07, 0x73, 0xbc, 0x04, 0x37, 0xf9, 0xcd, 0x1b, 0x9f, + 0x98, 0x05, 0x03, 0x38, 0xad, 0x81, 0x69, 0x58, 0xb7, 0x27, 0x71, 0xe9, 0xd7, 0x01, 0xa4, 0xc7, + 0x18, 0x7d, 0x46, 0x94, 0x47, 0x67, 0x05, 0xe5, 0x98, 0x3e, 0x23, 0x5d, 0xee, 0x99, 0xee, 0x76, + 0xcf, 0x0a, 0xe4, 0x58, 0xfb, 0x2c, 0xa2, 0xd6, 0x05, 0x13, 0x7e, 0xcb, 0x18, 0xc9, 0x58, 0xff, + 0x77, 0x0a, 0x6e, 0x77, 0x2c, 0xef, 0x2d, 0x3c, 0x1e, 0xdf, 0xe4, 0x55, 0xd8, 0x77, 0x11, 0x3e, + 0x83, 0x55, 0x59, 0x01, 0xda, 0x66, 0x67, 0xd1, 0x81, 0xcf, 0x28, 0x0f, 0x08, 0xab, 0xa4, 0x45, + 0x35, 0xfd, 0xd6, 0xc4, 0x9a, 0x1a, 0x31, 0x46, 0x43, 0x41, 0x18, 0xcb, 0x0a, 0x7e, 0x80, 0xc3, + 0x90, 0x07, 0xb7, 0x63, 0xdd, 0xf2, 0x82, 0xe9, 0xe8, 0xcd, 0x08, 0xbd, 0x6f, 0x4c, 0xac, 0x77, + 0x93, 0xcb, 0x27, 0x3a, 0x17, 0x15, 0x6c, 0x0f, 0x95, 0xed, 0x67, 0x72, 0xa9, 0x62, 0x5a, 0xff, + 0xe7, 0x1c, 0x94, 0x8f, 0x23, 0x1c, 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 0x33, 0x46, 0x1c, 0xe8, 0x25, 0xa3, 0x28, 0x19, 0x46, 0x42, 0xd7, 0xff, + 0x9c, 0x86, 0xaf, 0x25, 0x57, 0xf2, 0xb0, 0x66, 0x42, 0xbf, 0xc5, 0xcf, 0xaf, 0x9b, 0x96, 0x20, + 0xcb, 0x6b, 0x19, 0x12, 0x0a, 0xbb, 0x67, 0x0d, 0x35, 0x1a, 0x6f, 0xf4, 0x1e, 0x64, 0x59, 0x84, + 0xa3, 0xb6, 0xac, 0x36, 0xe7, 0x27, 0x09, 0xec, 0x96, 0x52, 0x79, 0x2c, 0xe4, 0x0c, 0x25, 0x8f, + 0xbe, 0x0d, 0xab, 0xaa, 0x72, 0x35, 0x2d, 0xdf, 0xbb, 0x24, 0x21, 0xe3, 0x0f, 0xa7, 0xa4, 0x99, + 0x91, 0x15, 0x8e, 0x58, 0x56, 0x53, 0xb6, 0x92, 0x19, 0x71, 0xbb, 0x66, 0xb8, 0xfb, 0x66, 0x86, + 0xbb, 0x0f, 0xbd, 0x04, 0xa5, 0xb8, 0x74, 0xe3, 0x75, 0x93, 0xc9, 0x7f, 0x89, 0x93, 0xb9, 0x60, + 0xdc, 0x8a, 0x19, 0x0d, 0x12, 0x9e, 0x50, 0xeb, 0x82, 0xbf, 0x70, 0x58, 0x44, 0x02, 0xf3, 0x0c, + 0xb3, 0xae, 0xe2, 0x5a, 0x3e, 0x59, 0x8a, 0x9c, 0x53, 0xc3, 0xac, 0x53, 0x5a, 0x7f, 0x13, 0xe6, + 0x65, 0xb5, 0x4a, 0xa3, 0x2b, 0x33, 0xa2, 0x24, 0xac, 0x80, 0x80, 0x2d, 0x24, 0xd4, 0x13, 0x4a, + 0xc2, 0xb7, 0x52, 0x15, 0x4d, 0xff, 0x45, 0x66, 0x6c, 0x0c, 0x37, 0xfe, 0x1f, 0xc3, 0xff, 0xea, + 0x18, 0xa2, 0x47, 0x90, 0x57, 0x4e, 0x15, 0xed, 0xe6, 0xbc, 0x70, 0xde, 0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 0x06, 0xc5, 0x92, 0x73, 0x54, 0x75, 0x75, 0xcb, + 0xbd, 0xa1, 0x0f, 0x84, 0x98, 0xfe, 0xb1, 0x06, 0x15, 0x83, 0xb4, 0x28, 0x8b, 0x48, 0xb8, 0x19, + 0x77, 0x66, 0xe3, 0xec, 0xdb, 0x80, 0x99, 0x90, 0x34, 0x49, 0x48, 0x64, 0xa3, 0x65, 0xcc, 0x07, + 0x18, 0x23, 0x9e, 0x88, 0xde, 0x80, 0xd9, 0xa4, 0xc3, 0xfb, 0xbc, 0xcf, 0x36, 0x46, 0x67, 0x2a, + 0xaa, 0xc2, 0x42, 0xa8, 0xec, 0x20, 0xb6, 0x89, 0x23, 0xf3, 0xcc, 0xf1, 0xad, 0x0b, 0xd5, 0xf3, + 0x2e, 0x75, 0x58, 0x9b, 0x51, 0x8d, 0x33, 0x6a, 0xc6, 0x27, 0x9f, 0xdf, 0xd1, 0x3e, 0xfd, 0xfc, + 0x8e, 0xf6, 0xaf, 0xcf, 0xef, 0x68, 0x3f, 0xfb, 0xe2, 0xce, 0xd4, 0xa7, 0x5f, 0xdc, 0x99, 0xfa, + 0xfb, 0x17, 0x77, 0xa6, 0x1e, 0xbf, 0x39, 0x79, 0xd6, 0xf5, 0xfe, 0x97, 0xc2, 0x59, 0x56, 0x30, + 0xbe, 0xf5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x24, 0x81, 0x1f, 0xcb, 0x20, 0x00, 0x00, } func (m *FundingUpdateV1) Marshal() (dAtA []byte, err error) { @@ -3216,6 +3295,11 @@ func (m *OrderFillEventV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.AffiliateRevShare != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.AffiliateRevShare)) + i-- + dAtA[i] = 0x48 + } if m.TotalFilledTaker != 0 { i = encodeVarintEvents(dAtA, i, uint64(m.TotalFilledTaker)) i-- @@ -4464,6 +4548,48 @@ func (m *LiquidityTierUpsertEventV2) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } +func (m *RegisterAffiliateEventV1) 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 *RegisterAffiliateEventV1) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RegisterAffiliateEventV1) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.RegisteredAtBlock != 0 { + i = encodeVarintEvents(dAtA, i, uint64(m.RegisteredAtBlock)) + i-- + dAtA[i] = 0x18 + } + if len(m.Affiliate) > 0 { + i -= len(m.Affiliate) + copy(dAtA[i:], m.Affiliate) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Affiliate))) + i-- + dAtA[i] = 0x12 + } + if len(m.Referee) > 0 { + i -= len(m.Referee) + copy(dAtA[i:], m.Referee) + i = encodeVarintEvents(dAtA, i, uint64(len(m.Referee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintEvents(dAtA []byte, offset int, v uint64) int { offset -= sovEvents(v) base := offset @@ -4709,6 +4835,9 @@ func (m *OrderFillEventV1) Size() (n int) { if m.TotalFilledTaker != 0 { n += 1 + sovEvents(uint64(m.TotalFilledTaker)) } + if m.AffiliateRevShare != 0 { + n += 1 + sovEvents(uint64(m.AffiliateRevShare)) + } return n } @@ -5256,6 +5385,26 @@ func (m *LiquidityTierUpsertEventV2) Size() (n int) { return n } +func (m *RegisterAffiliateEventV1) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Referee) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.Affiliate) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + if m.RegisteredAtBlock != 0 { + n += 1 + sovEvents(uint64(m.RegisteredAtBlock)) + } + return n +} + func sovEvents(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -6603,6 +6752,25 @@ func (m *OrderFillEventV1) Unmarshal(dAtA []byte) error { break } } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AffiliateRevShare", wireType) + } + m.AffiliateRevShare = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AffiliateRevShare |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -9741,6 +9909,139 @@ func (m *LiquidityTierUpsertEventV2) Unmarshal(dAtA []byte) error { } return nil } +func (m *RegisterAffiliateEventV1) 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 ErrIntOverflowEvents + } + 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: RegisterAffiliateEventV1: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegisterAffiliateEventV1: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Referee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Referee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Affiliate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + 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 ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Affiliate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RegisteredAtBlock", wireType) + } + m.RegisteredAtBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RegisteredAtBlock |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipEvents(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthEvents + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipEvents(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protocol/x/affiliates/types/affiliates.pb.go b/protocol/x/affiliates/types/affiliates.pb.go new file mode 100644 index 00000000000..087b361ea90 --- /dev/null +++ b/protocol/x/affiliates/types/affiliates.pb.go @@ -0,0 +1,605 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: dydxprotocol/affiliates/affiliates.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + 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 + +// AffiliateTiers defines the affiliate tiers. +type AffiliateTiers struct { + // All affiliate tiers + Tiers []AffiliateTiers_Tier `protobuf:"bytes,1,rep,name=tiers,proto3" json:"tiers"` +} + +func (m *AffiliateTiers) Reset() { *m = AffiliateTiers{} } +func (m *AffiliateTiers) String() string { return proto.CompactTextString(m) } +func (*AffiliateTiers) ProtoMessage() {} +func (*AffiliateTiers) Descriptor() ([]byte, []int) { + return fileDescriptor_7de5ba9c426e9350, []int{0} +} +func (m *AffiliateTiers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AffiliateTiers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AffiliateTiers.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 *AffiliateTiers) XXX_Merge(src proto.Message) { + xxx_messageInfo_AffiliateTiers.Merge(m, src) +} +func (m *AffiliateTiers) XXX_Size() int { + return m.Size() +} +func (m *AffiliateTiers) XXX_DiscardUnknown() { + xxx_messageInfo_AffiliateTiers.DiscardUnknown(m) +} + +var xxx_messageInfo_AffiliateTiers proto.InternalMessageInfo + +func (m *AffiliateTiers) GetTiers() []AffiliateTiers_Tier { + if m != nil { + return m.Tiers + } + return nil +} + +// Tier defines an affiliate tier. +type AffiliateTiers_Tier struct { + // Level of the tier + Level uint32 `protobuf:"varint,1,opt,name=level,proto3" json:"level,omitempty"` + // Required all-time referred volume in quote quantums. + ReqReferredVolume uint64 `protobuf:"varint,2,opt,name=req_referred_volume,json=reqReferredVolume,proto3" json:"req_referred_volume,omitempty"` + // Required currently staked native tokens (in whole coins). + ReqStakedWholeCoins uint32 `protobuf:"varint,3,opt,name=req_staked_whole_coins,json=reqStakedWholeCoins,proto3" json:"req_staked_whole_coins,omitempty"` + // Taker fee share in parts-per-million. + TakerFeeSharePpm uint32 `protobuf:"varint,4,opt,name=taker_fee_share_ppm,json=takerFeeSharePpm,proto3" json:"taker_fee_share_ppm,omitempty"` +} + +func (m *AffiliateTiers_Tier) Reset() { *m = AffiliateTiers_Tier{} } +func (m *AffiliateTiers_Tier) String() string { return proto.CompactTextString(m) } +func (*AffiliateTiers_Tier) ProtoMessage() {} +func (*AffiliateTiers_Tier) Descriptor() ([]byte, []int) { + return fileDescriptor_7de5ba9c426e9350, []int{0, 0} +} +func (m *AffiliateTiers_Tier) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AffiliateTiers_Tier) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AffiliateTiers_Tier.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 *AffiliateTiers_Tier) XXX_Merge(src proto.Message) { + xxx_messageInfo_AffiliateTiers_Tier.Merge(m, src) +} +func (m *AffiliateTiers_Tier) XXX_Size() int { + return m.Size() +} +func (m *AffiliateTiers_Tier) XXX_DiscardUnknown() { + xxx_messageInfo_AffiliateTiers_Tier.DiscardUnknown(m) +} + +var xxx_messageInfo_AffiliateTiers_Tier proto.InternalMessageInfo + +func (m *AffiliateTiers_Tier) GetLevel() uint32 { + if m != nil { + return m.Level + } + return 0 +} + +func (m *AffiliateTiers_Tier) GetReqReferredVolume() uint64 { + if m != nil { + return m.ReqReferredVolume + } + return 0 +} + +func (m *AffiliateTiers_Tier) GetReqStakedWholeCoins() uint32 { + if m != nil { + return m.ReqStakedWholeCoins + } + return 0 +} + +func (m *AffiliateTiers_Tier) GetTakerFeeSharePpm() uint32 { + if m != nil { + return m.TakerFeeSharePpm + } + return 0 +} + +func init() { + proto.RegisterType((*AffiliateTiers)(nil), "dydxprotocol.affiliates.AffiliateTiers") + proto.RegisterType((*AffiliateTiers_Tier)(nil), "dydxprotocol.affiliates.AffiliateTiers.Tier") +} + +func init() { + proto.RegisterFile("dydxprotocol/affiliates/affiliates.proto", fileDescriptor_7de5ba9c426e9350) +} + +var fileDescriptor_7de5ba9c426e9350 = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x3f, 0x4f, 0xc2, 0x40, + 0x18, 0xc6, 0x7b, 0x50, 0x1c, 0xce, 0x68, 0xb4, 0x10, 0x6d, 0x18, 0x2a, 0x71, 0xea, 0x20, 0xd7, + 0x44, 0x1c, 0x5d, 0xc4, 0xc4, 0x38, 0x9a, 0x62, 0x30, 0x71, 0xb9, 0x94, 0xf6, 0x2d, 0x6d, 0x6c, + 0xb9, 0x72, 0x77, 0x20, 0x7c, 0x08, 0x13, 0x3f, 0x8a, 0x1f, 0x83, 0x91, 0xd1, 0xc9, 0x18, 0xf8, + 0x22, 0xe6, 0x0e, 0xff, 0x94, 0xc1, 0xe5, 0xf2, 0xdc, 0xf3, 0x7b, 0xde, 0x67, 0x79, 0xb0, 0x1b, + 0xcd, 0xa3, 0x59, 0xc1, 0x99, 0x64, 0x21, 0xcb, 0xbc, 0x20, 0x8e, 0xd3, 0x2c, 0x0d, 0x24, 0x88, + 0x92, 0x24, 0x1a, 0x5b, 0xc7, 0xe5, 0x24, 0xf9, 0xc3, 0xcd, 0xc6, 0x90, 0x0d, 0x99, 0x06, 0x9e, + 0x52, 0x9b, 0x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eb, 0xcc, 0xca, 0x0b, 0xc9, 0x79, 0x01, + 0x62, 0xb0, 0xa3, 0x61, 0xe7, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x3a, 0x06, 0x98, 0x72, 0xc9, 0x01, + 0x00, 0x00, +} + +func (m *AffiliateTiers) 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 *AffiliateTiers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AffiliateTiers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Tiers) > 0 { + for iNdEx := len(m.Tiers) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Tiers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintAffiliates(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AffiliateTiers_Tier) 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 *AffiliateTiers_Tier) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AffiliateTiers_Tier) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TakerFeeSharePpm != 0 { + i = encodeVarintAffiliates(dAtA, i, uint64(m.TakerFeeSharePpm)) + i-- + dAtA[i] = 0x20 + } + if m.ReqStakedWholeCoins != 0 { + i = encodeVarintAffiliates(dAtA, i, uint64(m.ReqStakedWholeCoins)) + i-- + dAtA[i] = 0x18 + } + if m.ReqReferredVolume != 0 { + i = encodeVarintAffiliates(dAtA, i, uint64(m.ReqReferredVolume)) + i-- + dAtA[i] = 0x10 + } + if m.Level != 0 { + i = encodeVarintAffiliates(dAtA, i, uint64(m.Level)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintAffiliates(dAtA []byte, offset int, v uint64) int { + offset -= sovAffiliates(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AffiliateTiers) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Tiers) > 0 { + for _, e := range m.Tiers { + l = e.Size() + n += 1 + l + sovAffiliates(uint64(l)) + } + } + return n +} + +func (m *AffiliateTiers_Tier) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Level != 0 { + n += 1 + sovAffiliates(uint64(m.Level)) + } + if m.ReqReferredVolume != 0 { + n += 1 + sovAffiliates(uint64(m.ReqReferredVolume)) + } + if m.ReqStakedWholeCoins != 0 { + n += 1 + sovAffiliates(uint64(m.ReqStakedWholeCoins)) + } + if m.TakerFeeSharePpm != 0 { + n += 1 + sovAffiliates(uint64(m.TakerFeeSharePpm)) + } + return n +} + +func sovAffiliates(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozAffiliates(x uint64) (n int) { + return sovAffiliates(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AffiliateTiers) 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 ErrIntOverflowAffiliates + } + 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: AffiliateTiers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AffiliateTiers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tiers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAffiliates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAffiliates + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthAffiliates + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tiers = append(m.Tiers, AffiliateTiers_Tier{}) + if err := m.Tiers[len(m.Tiers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAffiliates(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAffiliates + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AffiliateTiers_Tier) 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 ErrIntOverflowAffiliates + } + 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: Tier: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tier: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAffiliates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqReferredVolume", wireType) + } + m.ReqReferredVolume = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAffiliates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReqReferredVolume |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReqStakedWholeCoins", wireType) + } + m.ReqStakedWholeCoins = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAffiliates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ReqStakedWholeCoins |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TakerFeeSharePpm", wireType) + } + m.TakerFeeSharePpm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAffiliates + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TakerFeeSharePpm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipAffiliates(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthAffiliates + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAffiliates(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, ErrIntOverflowAffiliates + } + 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, ErrIntOverflowAffiliates + } + 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, ErrIntOverflowAffiliates + } + 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, ErrInvalidLengthAffiliates + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupAffiliates + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthAffiliates + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthAffiliates = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAffiliates = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupAffiliates = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protocol/x/affiliates/types/query.pb.go b/protocol/x/affiliates/types/query.pb.go index ed7d042f7ea..c8287362400 100644 --- a/protocol/x/affiliates/types/query.pb.go +++ b/protocol/x/affiliates/types/query.pb.go @@ -6,10 +6,17 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" + github_com_dydxprotocol_v4_chain_protocol_dtypes "github.com/dydxprotocol/v4-chain/protocol/dtypes" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,21 +30,336 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// AffiliateInfoRequest is the request type for the Query/AffiliateInfo RPC +// method. +type AffiliateInfoRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *AffiliateInfoRequest) Reset() { *m = AffiliateInfoRequest{} } +func (m *AffiliateInfoRequest) String() string { return proto.CompactTextString(m) } +func (*AffiliateInfoRequest) ProtoMessage() {} +func (*AffiliateInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{0} +} +func (m *AffiliateInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AffiliateInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AffiliateInfoRequest.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 *AffiliateInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AffiliateInfoRequest.Merge(m, src) +} +func (m *AffiliateInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *AffiliateInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AffiliateInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AffiliateInfoRequest proto.InternalMessageInfo + +func (m *AffiliateInfoRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// AffiliateInfoResponse is the response type for the Query/AffiliateInfo RPC +// method. +type AffiliateInfoResponse struct { + // The affiliate's tier. + Tier uint32 `protobuf:"varint,1,opt,name=tier,proto3" json:"tier,omitempty"` + // The affiliate's taker fee share in parts-per-million. + FeeSharePpm uint32 `protobuf:"varint,2,opt,name=fee_share_ppm,json=feeSharePpm,proto3" json:"fee_share_ppm,omitempty"` + // The affiliate's all-time referred volume in quote quantums. + ReferredVolume github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,3,opt,name=referred_volume,json=referredVolume,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"referred_volume"` + // The affiliate's currently staked native tokens (in whole coins). + StakedAmount github_com_dydxprotocol_v4_chain_protocol_dtypes.SerializableInt `protobuf:"bytes,4,opt,name=staked_amount,json=stakedAmount,proto3,customtype=github.com/dydxprotocol/v4-chain/protocol/dtypes.SerializableInt" json:"staked_amount"` +} + +func (m *AffiliateInfoResponse) Reset() { *m = AffiliateInfoResponse{} } +func (m *AffiliateInfoResponse) String() string { return proto.CompactTextString(m) } +func (*AffiliateInfoResponse) ProtoMessage() {} +func (*AffiliateInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{1} +} +func (m *AffiliateInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AffiliateInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AffiliateInfoResponse.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 *AffiliateInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AffiliateInfoResponse.Merge(m, src) +} +func (m *AffiliateInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *AffiliateInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AffiliateInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AffiliateInfoResponse proto.InternalMessageInfo + +func (m *AffiliateInfoResponse) GetTier() uint32 { + if m != nil { + return m.Tier + } + return 0 +} + +func (m *AffiliateInfoResponse) GetFeeSharePpm() uint32 { + if m != nil { + return m.FeeSharePpm + } + return 0 +} + +// ReferredByRequest is the request type for the Query/ReferredBy RPC method. +type ReferredByRequest struct { + // The address to query. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (m *ReferredByRequest) Reset() { *m = ReferredByRequest{} } +func (m *ReferredByRequest) String() string { return proto.CompactTextString(m) } +func (*ReferredByRequest) ProtoMessage() {} +func (*ReferredByRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{2} +} +func (m *ReferredByRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReferredByRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReferredByRequest.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 *ReferredByRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReferredByRequest.Merge(m, src) +} +func (m *ReferredByRequest) XXX_Size() int { + return m.Size() +} +func (m *ReferredByRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ReferredByRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ReferredByRequest proto.InternalMessageInfo + +func (m *ReferredByRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +// ReferredByResponse is the response type for the Query/ReferredBy RPC method. +type ReferredByResponse struct { + // The affiliate's address that referred the queried address. + AffiliateAddress string `protobuf:"bytes,1,opt,name=affiliate_address,json=affiliateAddress,proto3" json:"affiliate_address,omitempty"` +} + +func (m *ReferredByResponse) Reset() { *m = ReferredByResponse{} } +func (m *ReferredByResponse) String() string { return proto.CompactTextString(m) } +func (*ReferredByResponse) ProtoMessage() {} +func (*ReferredByResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{3} +} +func (m *ReferredByResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReferredByResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReferredByResponse.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 *ReferredByResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReferredByResponse.Merge(m, src) +} +func (m *ReferredByResponse) XXX_Size() int { + return m.Size() +} +func (m *ReferredByResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ReferredByResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ReferredByResponse proto.InternalMessageInfo + +func (m *ReferredByResponse) GetAffiliateAddress() string { + if m != nil { + return m.AffiliateAddress + } + return "" +} + +// AllAffiliateTiersRequest is the request type for the Query/AllAffiliateTiers +// RPC method. +type AllAffiliateTiersRequest struct { +} + +func (m *AllAffiliateTiersRequest) Reset() { *m = AllAffiliateTiersRequest{} } +func (m *AllAffiliateTiersRequest) String() string { return proto.CompactTextString(m) } +func (*AllAffiliateTiersRequest) ProtoMessage() {} +func (*AllAffiliateTiersRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{4} +} +func (m *AllAffiliateTiersRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllAffiliateTiersRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllAffiliateTiersRequest.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 *AllAffiliateTiersRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllAffiliateTiersRequest.Merge(m, src) +} +func (m *AllAffiliateTiersRequest) XXX_Size() int { + return m.Size() +} +func (m *AllAffiliateTiersRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AllAffiliateTiersRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AllAffiliateTiersRequest proto.InternalMessageInfo + +// AllAffiliateTiersResponse is the response type for the +// Query/AllAffiliateTiers RPC method. +type AllAffiliateTiersResponse struct { + // All affiliate tiers information. + Tiers AffiliateTiers `protobuf:"bytes,1,opt,name=tiers,proto3" json:"tiers"` +} + +func (m *AllAffiliateTiersResponse) Reset() { *m = AllAffiliateTiersResponse{} } +func (m *AllAffiliateTiersResponse) String() string { return proto.CompactTextString(m) } +func (*AllAffiliateTiersResponse) ProtoMessage() {} +func (*AllAffiliateTiersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2edc1b3ea39b05a9, []int{5} +} +func (m *AllAffiliateTiersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AllAffiliateTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AllAffiliateTiersResponse.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 *AllAffiliateTiersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllAffiliateTiersResponse.Merge(m, src) +} +func (m *AllAffiliateTiersResponse) XXX_Size() int { + return m.Size() +} +func (m *AllAffiliateTiersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AllAffiliateTiersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AllAffiliateTiersResponse proto.InternalMessageInfo + +func (m *AllAffiliateTiersResponse) GetTiers() AffiliateTiers { + if m != nil { + return m.Tiers + } + return AffiliateTiers{} +} + +func init() { + proto.RegisterType((*AffiliateInfoRequest)(nil), "dydxprotocol.affiliates.AffiliateInfoRequest") + proto.RegisterType((*AffiliateInfoResponse)(nil), "dydxprotocol.affiliates.AffiliateInfoResponse") + proto.RegisterType((*ReferredByRequest)(nil), "dydxprotocol.affiliates.ReferredByRequest") + proto.RegisterType((*ReferredByResponse)(nil), "dydxprotocol.affiliates.ReferredByResponse") + proto.RegisterType((*AllAffiliateTiersRequest)(nil), "dydxprotocol.affiliates.AllAffiliateTiersRequest") + proto.RegisterType((*AllAffiliateTiersResponse)(nil), "dydxprotocol.affiliates.AllAffiliateTiersResponse") +} + func init() { proto.RegisterFile("dydxprotocol/affiliates/query.proto", fileDescriptor_2edc1b3ea39b05a9) } var fileDescriptor_2edc1b3ea39b05a9 = []byte{ - // 139 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xa9, 0x4c, 0xa9, - 0x28, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x4f, 0x4c, 0x4b, 0xcb, 0xcc, 0xc9, 0x4c, - 0x2c, 0x49, 0x2d, 0xd6, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x03, 0xcb, 0x08, 0x89, 0x23, 0x2b, - 0xd2, 0x43, 0x28, 0x32, 0x62, 0xe7, 0x62, 0x0d, 0x04, 0xa9, 0x73, 0x0a, 0x3b, 0xf1, 0x48, 0x8e, - 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, - 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x9b, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, - 0xfc, 0x5c, 0x7d, 0x14, 0xbb, 0xca, 0x4c, 0x74, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xe1, 0x22, - 0x15, 0xc8, 0xf6, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x25, 0x8d, 0x01, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xe9, 0xbc, 0xb9, 0x69, 0xa7, 0x00, 0x00, 0x00, + // 506 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0x8e, 0x43, 0x0a, 0x62, 0xda, 0x00, 0x59, 0x05, 0xe1, 0xfa, 0xe0, 0x56, 0xe6, 0x40, 0x04, + 0x8a, 0x2d, 0x02, 0x47, 0x0e, 0xc4, 0x08, 0x41, 0x39, 0x81, 0x83, 0x7a, 0x80, 0x83, 0x71, 0xe2, + 0x71, 0x62, 0x61, 0x7b, 0x9d, 0xdd, 0x75, 0xd5, 0xf4, 0x29, 0x78, 0x15, 0x24, 0x1e, 0xa2, 0xc7, + 0x8a, 0x13, 0xea, 0xa1, 0x42, 0xc9, 0x8b, 0x20, 0xff, 0xe4, 0x8f, 0x62, 0x11, 0x44, 0x6f, 0xe3, + 0x99, 0xef, 0x67, 0x3c, 0x33, 0x36, 0xdc, 0x77, 0x27, 0xee, 0x71, 0xcc, 0xa8, 0xa0, 0x03, 0x1a, + 0x18, 0x8e, 0xe7, 0xf9, 0x81, 0xef, 0x08, 0xe4, 0xc6, 0x38, 0x41, 0x36, 0xd1, 0xb3, 0x0a, 0xb9, + 0xb7, 0x0a, 0xd2, 0x97, 0x20, 0x65, 0x77, 0x40, 0x79, 0x48, 0xb9, 0x9d, 0xd5, 0x8c, 0xfc, 0x21, + 0xe7, 0x28, 0xcd, 0x21, 0x1d, 0xd2, 0x3c, 0x9f, 0x46, 0x45, 0xb6, 0x55, 0x66, 0xb7, 0x0c, 0x73, + 0xa4, 0xf6, 0x06, 0x9a, 0xdd, 0x79, 0xee, 0x20, 0xf2, 0xa8, 0x85, 0xe3, 0x04, 0xb9, 0x20, 0x1d, + 0xb8, 0xe1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0x8b, 0x95, 0xdb, 0x9b, 0x6a, 0xde, 0x59, 0x50, + 0x8a, 0xbc, 0xa6, 0x80, 0xdc, 0x0d, 0x82, 0xc5, 0x6e, 0xdf, 0xfb, 0xc8, 0x78, 0xd1, 0xac, 0xf6, + 0x09, 0x76, 0xff, 0x50, 0x2b, 0xfc, 0x5f, 0xc0, 0x56, 0xba, 0xec, 0xdc, 0x73, 0xbb, 0xf3, 0x40, + 0x2f, 0x39, 0x71, 0x7d, 0x9d, 0x6f, 0xd6, 0xd2, 0x71, 0x5b, 0x39, 0xb7, 0x73, 0x5e, 0x85, 0xad, + 0x77, 0xe9, 0x77, 0x42, 0x22, 0xa8, 0xaf, 0x1d, 0x18, 0x69, 0xff, 0x5d, 0x70, 0xe5, 0xaa, 0x15, + 0x7d, 0x53, 0x78, 0xd1, 0x3e, 0x02, 0x2c, 0x87, 0x4a, 0x1e, 0x96, 0xb2, 0x2f, 0xad, 0x50, 0x79, + 0xb4, 0x11, 0xb6, 0xb0, 0x39, 0x81, 0xc6, 0xa5, 0x11, 0x92, 0xc7, 0xe5, 0xbd, 0x96, 0xac, 0x42, + 0xe9, 0xfc, 0x0b, 0x25, 0xf7, 0x36, 0x0f, 0x4f, 0xa7, 0xaa, 0x74, 0x36, 0x55, 0xa5, 0x9f, 0x53, + 0x55, 0xfa, 0x32, 0x53, 0x2b, 0x67, 0x33, 0xb5, 0xf2, 0x63, 0xa6, 0x56, 0x3e, 0x3c, 0xdb, 0xfc, + 0xd4, 0x8f, 0x57, 0xff, 0x31, 0xd9, 0xd9, 0xf7, 0xaf, 0x67, 0xc5, 0x27, 0xbf, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x31, 0x96, 0xc3, 0xe2, 0xfa, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -52,6 +374,12 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { + // Query AffiliateInfo returns the affiliate info for a given address. + AffiliateInfo(ctx context.Context, in *AffiliateInfoRequest, opts ...grpc.CallOption) (*AffiliateInfoResponse, error) + // Query ReferredBy returns the affiliate that referred a given address. + ReferredBy(ctx context.Context, in *ReferredByRequest, opts ...grpc.CallOption) (*ReferredByResponse, error) + // Query AllAffiliateTiers returns all affiliate tiers. + AllAffiliateTiers(ctx context.Context, in *AllAffiliateTiersRequest, opts ...grpc.CallOption) (*AllAffiliateTiersResponse, error) } type queryClient struct { @@ -62,22 +390,1044 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) AffiliateInfo(ctx context.Context, in *AffiliateInfoRequest, opts ...grpc.CallOption) (*AffiliateInfoResponse, error) { + out := new(AffiliateInfoResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.affiliates.Query/AffiliateInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ReferredBy(ctx context.Context, in *ReferredByRequest, opts ...grpc.CallOption) (*ReferredByResponse, error) { + out := new(ReferredByResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.affiliates.Query/ReferredBy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) AllAffiliateTiers(ctx context.Context, in *AllAffiliateTiersRequest, opts ...grpc.CallOption) (*AllAffiliateTiersResponse, error) { + out := new(AllAffiliateTiersResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.affiliates.Query/AllAffiliateTiers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { + // Query AffiliateInfo returns the affiliate info for a given address. + AffiliateInfo(context.Context, *AffiliateInfoRequest) (*AffiliateInfoResponse, error) + // Query ReferredBy returns the affiliate that referred a given address. + ReferredBy(context.Context, *ReferredByRequest) (*ReferredByResponse, error) + // Query AllAffiliateTiers returns all affiliate tiers. + AllAffiliateTiers(context.Context, *AllAffiliateTiersRequest) (*AllAffiliateTiersResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) AffiliateInfo(ctx context.Context, req *AffiliateInfoRequest) (*AffiliateInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AffiliateInfo not implemented") +} +func (*UnimplementedQueryServer) ReferredBy(ctx context.Context, req *ReferredByRequest) (*ReferredByResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ReferredBy not implemented") +} +func (*UnimplementedQueryServer) AllAffiliateTiers(ctx context.Context, req *AllAffiliateTiersRequest) (*AllAffiliateTiersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllAffiliateTiers not implemented") +} + func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_AffiliateInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AffiliateInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AffiliateInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.affiliates.Query/AffiliateInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AffiliateInfo(ctx, req.(*AffiliateInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ReferredBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReferredByRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ReferredBy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.affiliates.Query/ReferredBy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ReferredBy(ctx, req.(*ReferredByRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_AllAffiliateTiers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AllAffiliateTiersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AllAffiliateTiers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.affiliates.Query/AllAffiliateTiers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AllAffiliateTiers(ctx, req.(*AllAffiliateTiersRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "dydxprotocol.affiliates.Query", HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "dydxprotocol/affiliates/query.proto", + Methods: []grpc.MethodDesc{ + { + MethodName: "AffiliateInfo", + Handler: _Query_AffiliateInfo_Handler, + }, + { + MethodName: "ReferredBy", + Handler: _Query_ReferredBy_Handler, + }, + { + MethodName: "AllAffiliateTiers", + Handler: _Query_AllAffiliateTiers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "dydxprotocol/affiliates/query.proto", +} + +func (m *AffiliateInfoRequest) 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 *AffiliateInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AffiliateInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AffiliateInfoResponse) 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 *AffiliateInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AffiliateInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.StakedAmount.Size() + i -= size + if _, err := m.StakedAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.ReferredVolume.Size() + i -= size + if _, err := m.ReferredVolume.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if m.FeeSharePpm != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.FeeSharePpm)) + i-- + dAtA[i] = 0x10 + } + if m.Tier != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Tier)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ReferredByRequest) 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 *ReferredByRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReferredByRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ReferredByResponse) 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 *ReferredByResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReferredByResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AffiliateAddress) > 0 { + i -= len(m.AffiliateAddress) + copy(dAtA[i:], m.AffiliateAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AffiliateAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AllAffiliateTiersRequest) 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 *AllAffiliateTiersRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } + +func (m *AllAffiliateTiersRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *AllAffiliateTiersResponse) 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 *AllAffiliateTiersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AllAffiliateTiersResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Tiers.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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AffiliateInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AffiliateInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tier != 0 { + n += 1 + sovQuery(uint64(m.Tier)) + } + if m.FeeSharePpm != 0 { + n += 1 + sovQuery(uint64(m.FeeSharePpm)) + } + l = m.ReferredVolume.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.StakedAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *ReferredByRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *ReferredByResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AffiliateAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *AllAffiliateTiersRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AllAffiliateTiersResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Tiers.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AffiliateInfoRequest) 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: AffiliateInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AffiliateInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + 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 (m *AffiliateInfoResponse) 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: AffiliateInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AffiliateInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Tier", wireType) + } + m.Tier = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Tier |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeSharePpm", wireType) + } + m.FeeSharePpm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeSharePpm |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReferredVolume", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ReferredVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakedAmount", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakedAmount.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 (m *ReferredByRequest) 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: ReferredByRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReferredByRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + 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 (m *ReferredByResponse) 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: ReferredByResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReferredByResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AffiliateAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AffiliateAddress = string(dAtA[iNdEx:postIndex]) + 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 (m *AllAffiliateTiersRequest) 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: AllAffiliateTiersRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllAffiliateTiersRequest: 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 *AllAffiliateTiersResponse) 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: AllAffiliateTiersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllAffiliateTiersResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tiers", 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.Tiers.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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrIntOverflowQuery + } + 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, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/protocol/x/affiliates/types/tx.pb.go b/protocol/x/affiliates/types/tx.pb.go index 3d134c06fec..91d45af27ac 100644 --- a/protocol/x/affiliates/types/tx.pb.go +++ b/protocol/x/affiliates/types/tx.pb.go @@ -6,10 +6,17 @@ package types import ( context "context" fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,19 +30,213 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// Message to register a referee-affiliate relationship +type MsgRegisterAffiliate struct { + // Address of the referee + Referee string `protobuf:"bytes,1,opt,name=referee,proto3" json:"referee,omitempty"` + // Address of the affiliate + Affiliate string `protobuf:"bytes,2,opt,name=affiliate,proto3" json:"affiliate,omitempty"` +} + +func (m *MsgRegisterAffiliate) Reset() { *m = MsgRegisterAffiliate{} } +func (m *MsgRegisterAffiliate) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterAffiliate) ProtoMessage() {} +func (*MsgRegisterAffiliate) Descriptor() ([]byte, []int) { + return fileDescriptor_41c2f092a0ec6d7f, []int{0} +} +func (m *MsgRegisterAffiliate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterAffiliate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterAffiliate.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 *MsgRegisterAffiliate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterAffiliate.Merge(m, src) +} +func (m *MsgRegisterAffiliate) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterAffiliate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterAffiliate.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterAffiliate proto.InternalMessageInfo + +// Response to MsgRegisterAffiliate +type MsgRegisterAffiliateResponse struct { +} + +func (m *MsgRegisterAffiliateResponse) Reset() { *m = MsgRegisterAffiliateResponse{} } +func (m *MsgRegisterAffiliateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterAffiliateResponse) ProtoMessage() {} +func (*MsgRegisterAffiliateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_41c2f092a0ec6d7f, []int{1} +} +func (m *MsgRegisterAffiliateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterAffiliateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterAffiliateResponse.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 *MsgRegisterAffiliateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterAffiliateResponse.Merge(m, src) +} +func (m *MsgRegisterAffiliateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterAffiliateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterAffiliateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterAffiliateResponse proto.InternalMessageInfo + +// Message to update affiliate tiers +type MsgUpdateAffiliateTiers struct { + // Authority sending this message. Will be sent by gov + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Updated affiliate tiers information + Tiers *AffiliateTiers `protobuf:"bytes,2,opt,name=tiers,proto3" json:"tiers,omitempty"` +} + +func (m *MsgUpdateAffiliateTiers) Reset() { *m = MsgUpdateAffiliateTiers{} } +func (m *MsgUpdateAffiliateTiers) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAffiliateTiers) ProtoMessage() {} +func (*MsgUpdateAffiliateTiers) Descriptor() ([]byte, []int) { + return fileDescriptor_41c2f092a0ec6d7f, []int{2} +} +func (m *MsgUpdateAffiliateTiers) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateAffiliateTiers) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateAffiliateTiers.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 *MsgUpdateAffiliateTiers) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAffiliateTiers.Merge(m, src) +} +func (m *MsgUpdateAffiliateTiers) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateAffiliateTiers) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAffiliateTiers.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateAffiliateTiers proto.InternalMessageInfo + +func (m *MsgUpdateAffiliateTiers) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateAffiliateTiers) GetTiers() *AffiliateTiers { + if m != nil { + return m.Tiers + } + return nil +} + +// Response to MsgUpdateAffiliateTiers +type MsgUpdateAffiliateTiersResponse struct { +} + +func (m *MsgUpdateAffiliateTiersResponse) Reset() { *m = MsgUpdateAffiliateTiersResponse{} } +func (m *MsgUpdateAffiliateTiersResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateAffiliateTiersResponse) ProtoMessage() {} +func (*MsgUpdateAffiliateTiersResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_41c2f092a0ec6d7f, []int{3} +} +func (m *MsgUpdateAffiliateTiersResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateAffiliateTiersResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateAffiliateTiersResponse.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 *MsgUpdateAffiliateTiersResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateAffiliateTiersResponse.Merge(m, src) +} +func (m *MsgUpdateAffiliateTiersResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateAffiliateTiersResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateAffiliateTiersResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateAffiliateTiersResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterAffiliate)(nil), "dydxprotocol.affiliates.MsgRegisterAffiliate") + proto.RegisterType((*MsgRegisterAffiliateResponse)(nil), "dydxprotocol.affiliates.MsgRegisterAffiliateResponse") + proto.RegisterType((*MsgUpdateAffiliateTiers)(nil), "dydxprotocol.affiliates.MsgUpdateAffiliateTiers") + proto.RegisterType((*MsgUpdateAffiliateTiersResponse)(nil), "dydxprotocol.affiliates.MsgUpdateAffiliateTiersResponse") +} + func init() { proto.RegisterFile("dydxprotocol/affiliates/tx.proto", fileDescriptor_41c2f092a0ec6d7f) } var fileDescriptor_41c2f092a0ec6d7f = []byte{ - // 135 bytes of a gzipped FileDescriptorProto + // 401 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xa9, 0x4c, 0xa9, 0x28, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0xce, 0xcf, 0xd1, 0x4f, 0x4c, 0x4b, 0xcb, 0xcc, 0xc9, 0x4c, 0x2c, 0x49, 0x2d, 0xd6, 0x2f, 0xa9, 0xd0, 0x03, 0x0b, 0x0b, 0x89, 0x23, 0xab, 0xd0, 0x43, 0xa8, - 0x30, 0x62, 0xe5, 0x62, 0xf6, 0x2d, 0x4e, 0x77, 0x0a, 0x3b, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, - 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, - 0x63, 0x39, 0x86, 0x28, 0x9b, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0x7d, - 0x14, 0x6b, 0xca, 0x4c, 0x74, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xe1, 0x22, 0x15, 0x28, 0x56, - 0x57, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x25, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x3d, - 0x87, 0xfa, 0x5d, 0xa2, 0x00, 0x00, 0x00, + 0x90, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x8e, 0x07, 0xcb, 0xe9, 0x43, 0x38, 0x10, 0x3d, + 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x10, 0x71, 0x10, 0x0b, 0x2a, 0xaa, 0x81, 0xcb, 0x2e, 0x04, + 0x13, 0xaa, 0x52, 0x1c, 0x62, 0x9a, 0x7e, 0x6e, 0x71, 0xba, 0x7e, 0x99, 0x21, 0x88, 0x82, 0x48, + 0x28, 0xcd, 0x60, 0xe4, 0x12, 0xf1, 0x2d, 0x4e, 0x0f, 0x4a, 0x4d, 0xcf, 0x2c, 0x2e, 0x49, 0x2d, + 0x72, 0x84, 0x69, 0x14, 0x32, 0xe2, 0x62, 0x2f, 0x4a, 0x4d, 0x4b, 0x2d, 0x4a, 0x4d, 0x95, 0x60, + 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x92, 0xb8, 0xb4, 0x45, 0x57, 0x04, 0xea, 0x28, 0xc7, 0x94, 0x94, + 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x98, 0x42, 0x21, 0x33, 0x2e, + 0x4e, 0xb8, 0xcd, 0x12, 0x4c, 0x04, 0x74, 0x21, 0x94, 0x5a, 0x89, 0x74, 0x2c, 0x90, 0x67, 0x78, + 0xb1, 0x40, 0x9e, 0xa1, 0xe9, 0xf9, 0x06, 0x2d, 0x98, 0x69, 0x4a, 0x72, 0x5c, 0x32, 0xd8, 0x5c, + 0x16, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0xaa, 0xb4, 0x80, 0x91, 0x4b, 0xdc, 0xb7, 0x38, + 0x3d, 0xb4, 0x20, 0x25, 0xb1, 0x24, 0x15, 0x2e, 0x1d, 0x92, 0x99, 0x5a, 0x54, 0x0c, 0x76, 0x49, + 0x69, 0x49, 0x46, 0x7e, 0x51, 0x66, 0x49, 0x25, 0x41, 0xf7, 0x23, 0x94, 0x0a, 0xd9, 0x72, 0xb1, + 0x96, 0x80, 0x0c, 0x00, 0xbb, 0x9e, 0xdb, 0x48, 0x5d, 0x0f, 0x47, 0x5c, 0xe9, 0xa1, 0xda, 0x17, + 0x04, 0xd1, 0x65, 0xc5, 0x07, 0xf2, 0x00, 0xc2, 0x38, 0x25, 0x45, 0x2e, 0x79, 0x1c, 0x2e, 0x84, + 0xf9, 0xc2, 0xa8, 0x95, 0x89, 0x8b, 0xd9, 0xb7, 0x38, 0x5d, 0xa8, 0x92, 0x4b, 0x10, 0x33, 0x12, + 0x74, 0x71, 0xda, 0x8f, 0x2d, 0x64, 0xa4, 0x4c, 0x49, 0x52, 0x0e, 0x73, 0x82, 0x50, 0x13, 0x23, + 0x97, 0x08, 0xd6, 0x50, 0x34, 0xc0, 0x67, 0x1e, 0x36, 0x1d, 0x52, 0x16, 0xa4, 0xea, 0x80, 0x39, + 0xc2, 0x29, 0xec, 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, 0x6c, 0xd2, 0x33, + 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x51, 0x12, 0x7c, 0x99, 0x89, 0x6e, 0x72, + 0x46, 0x62, 0x66, 0x9e, 0x3e, 0x5c, 0xa4, 0x02, 0x25, 0xc3, 0x55, 0x16, 0xa4, 0x16, 0x27, 0xb1, + 0x81, 0x25, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x83, 0xfa, 0x0e, 0x98, 0x03, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -50,6 +251,10 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + // RegisterAffiliate registers a referee-affiliate relationship + RegisterAffiliate(ctx context.Context, in *MsgRegisterAffiliate, opts ...grpc.CallOption) (*MsgRegisterAffiliateResponse, error) + // UpdateAffiliateTiers updates affiliate tiers + UpdateAffiliateTiers(ctx context.Context, in *MsgUpdateAffiliateTiers, opts ...grpc.CallOption) (*MsgUpdateAffiliateTiersResponse, error) } type msgClient struct { @@ -60,22 +265,707 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } +func (c *msgClient) RegisterAffiliate(ctx context.Context, in *MsgRegisterAffiliate, opts ...grpc.CallOption) (*MsgRegisterAffiliateResponse, error) { + out := new(MsgRegisterAffiliateResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.affiliates.Msg/RegisterAffiliate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateAffiliateTiers(ctx context.Context, in *MsgUpdateAffiliateTiers, opts ...grpc.CallOption) (*MsgUpdateAffiliateTiersResponse, error) { + out := new(MsgUpdateAffiliateTiersResponse) + err := c.cc.Invoke(ctx, "/dydxprotocol.affiliates.Msg/UpdateAffiliateTiers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { + // RegisterAffiliate registers a referee-affiliate relationship + RegisterAffiliate(context.Context, *MsgRegisterAffiliate) (*MsgRegisterAffiliateResponse, error) + // UpdateAffiliateTiers updates affiliate tiers + UpdateAffiliateTiers(context.Context, *MsgUpdateAffiliateTiers) (*MsgUpdateAffiliateTiersResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } +func (*UnimplementedMsgServer) RegisterAffiliate(ctx context.Context, req *MsgRegisterAffiliate) (*MsgRegisterAffiliateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterAffiliate not implemented") +} +func (*UnimplementedMsgServer) UpdateAffiliateTiers(ctx context.Context, req *MsgUpdateAffiliateTiers) (*MsgUpdateAffiliateTiersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAffiliateTiers not implemented") +} + func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } +func _Msg_RegisterAffiliate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterAffiliate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterAffiliate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.affiliates.Msg/RegisterAffiliate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterAffiliate(ctx, req.(*MsgRegisterAffiliate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateAffiliateTiers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateAffiliateTiers) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateAffiliateTiers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/dydxprotocol.affiliates.Msg/UpdateAffiliateTiers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateAffiliateTiers(ctx, req.(*MsgUpdateAffiliateTiers)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "dydxprotocol.affiliates.Msg", HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{}, - Metadata: "dydxprotocol/affiliates/tx.proto", + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterAffiliate", + Handler: _Msg_RegisterAffiliate_Handler, + }, + { + MethodName: "UpdateAffiliateTiers", + Handler: _Msg_UpdateAffiliateTiers_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "dydxprotocol/affiliates/tx.proto", +} + +func (m *MsgRegisterAffiliate) 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 *MsgRegisterAffiliate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterAffiliate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Affiliate) > 0 { + i -= len(m.Affiliate) + copy(dAtA[i:], m.Affiliate) + i = encodeVarintTx(dAtA, i, uint64(len(m.Affiliate))) + i-- + dAtA[i] = 0x12 + } + if len(m.Referee) > 0 { + i -= len(m.Referee) + copy(dAtA[i:], m.Referee) + i = encodeVarintTx(dAtA, i, uint64(len(m.Referee))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterAffiliateResponse) 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 *MsgRegisterAffiliateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterAffiliateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateAffiliateTiers) 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 *MsgUpdateAffiliateTiers) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateAffiliateTiers) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Tiers != nil { + { + size, err := m.Tiers.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 *MsgUpdateAffiliateTiersResponse) 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 *MsgUpdateAffiliateTiersResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateAffiliateTiersResponse) 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 + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterAffiliate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Referee) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Affiliate) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterAffiliateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateAffiliateTiers) 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)) + } + if m.Tiers != nil { + l = m.Tiers.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpdateAffiliateTiersResponse) 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 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterAffiliate) 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: MsgRegisterAffiliate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterAffiliate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Referee", 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.Referee = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Affiliate", 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.Affiliate = string(dAtA[iNdEx:postIndex]) + 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 *MsgRegisterAffiliateResponse) 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: MsgRegisterAffiliateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterAffiliateResponse: 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 (m *MsgUpdateAffiliateTiers) 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: MsgUpdateAffiliateTiers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateAffiliateTiers: 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 Tiers", 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 m.Tiers == nil { + m.Tiers = &AffiliateTiers{} + } + if err := m.Tiers.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 *MsgUpdateAffiliateTiersResponse) 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: MsgUpdateAffiliateTiersResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateAffiliateTiersResponse: 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 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +)