Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[OTE-780] Add client code for affiliates #2252

Merged
merged 9 commits into from
Sep 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
proto fixes
affanv14 committed Sep 13, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2e5732c348ba7213fdddbc6c8e37f37b63649b2c
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import { AffiliateTiers, AffiliateTiersSDKType } from "./affiliates";
import * as _m0 from "protobufjs/minimal";
import { DeepPartial } from "../../helpers";
/** GenesisState defines generis state of `x/affiliates` */

export interface GenesisState {}
export interface GenesisState {
/** The list of affiliate tiers */
affiliateTiers?: AffiliateTiers;
}
/** GenesisState defines generis state of `x/affiliates` */

export interface GenesisStateSDKType {}
export interface GenesisStateSDKType {
/** The list of affiliate tiers */
affiliate_tiers?: AffiliateTiersSDKType;
}

function createBaseGenesisState(): GenesisState {
return {};
return {
affiliateTiers: undefined
};
}

export const GenesisState = {
encode(_: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
if (message.affiliateTiers !== undefined) {
AffiliateTiers.encode(message.affiliateTiers, writer.uint32(10).fork()).ldelim();
}

return writer;
},

@@ -25,6 +38,10 @@ export const GenesisState = {
const tag = reader.uint32();

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

default:
reader.skipType(tag & 7);
break;
@@ -34,8 +51,9 @@ export const GenesisState = {
return message;
},

fromPartial(_: DeepPartial<GenesisState>): GenesisState {
fromPartial(object: DeepPartial<GenesisState>): GenesisState {
const message = createBaseGenesisState();
message.affiliateTiers = object.affiliateTiers !== undefined && object.affiliateTiers !== null ? AffiliateTiers.fromPartial(object.affiliateTiers) : undefined;
return message;
}

1 change: 0 additions & 1 deletion proto/dydxprotocol/affiliates/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
syntax = "proto3";
package dydxprotocol.affiliates;
import "gogoproto/gogo.proto";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the missing import for "gogoproto/gogo.proto".

The static analysis tool buf reports a missing import for "gogoproto/gogo.proto". This issue needs to be resolved to ensure successful compilation of the code.

Please check the following:

  1. Ensure that the gogoproto library is properly installed and configured in your project's build system.
  2. Verify that the import path is correct and the "gogo.proto" file exists in the specified location.

If you need further assistance, I'd be happy to help you resolve this issue. Let me know if you'd like me to investigate further or provide more specific guidance.

Tools
buf

3-3: import "gogoproto/gogo.proto": file does not exist

(COMPILE)

import "cosmos_proto/cosmos.proto";
import "dydxprotocol/affiliates/affiliates.proto";

option go_package = "github.com/dydxprotocol/v4-chain/protocol/x/affiliates/types";
22 changes: 10 additions & 12 deletions protocol/x/affiliates/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.