-
Notifications
You must be signed in to change notification settings - Fork 115
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-791] Add proto for affiliate whitelist #2232
Conversation
WalkthroughThe changes introduce a new affiliate whitelist system, enhancing the existing affiliate management framework. Key additions include new interfaces for the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant QueryService
participant Keeper
Client->>QueryService: affiliateWhitelist(request)
QueryService->>Keeper: AffiliateWhitelist(request)
Keeper-->>QueryService: AffiliateWhitelistResponse
QueryService-->>Client: AffiliateWhitelistResponse
Tip Announcements
Recent review detailsConfiguration used: CodeRabbit UI Files ignored due to path filters (2)
Files selected for processing (6)
Additional context usedBiome
Additional comments not posted (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1)
133-133
: Consider using type aliases for empty interfaces.The static analysis tool suggests using type aliases instead of empty interfaces for
AffiliateWhitelistRequest
andAffiliateWhitelistRequestSDKType
.-export interface AffiliateWhitelistRequest {} +export type AffiliateWhitelistRequest = Record<string, never>; -export interface AffiliateWhitelistRequestSDKType {} +export type AffiliateWhitelistRequestSDKType = Record<string, never>;Also applies to: 139-139
Tools
Biome
[error] 133-133: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
protocol/x/affiliates/types/affiliates.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/query.pb.go
is excluded by!**/*.pb.go
Files selected for processing (6)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (2 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (5 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (9 hunks)
- proto/dydxprotocol/affiliates/affiliates.proto (1 hunks)
- proto/dydxprotocol/affiliates/query.proto (3 hunks)
- protocol/x/affiliates/keeper/grpc_query.go (2 hunks)
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts
[error] 133-133: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 139-139: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (6)
proto/dydxprotocol/affiliates/affiliates.proto (1)
23-35
: LGTM!The code changes that introduce the new
AffiliateWhitelist
message and its nestedTier
message are well-structured, follow the existing style and conventions, and enhance the functionality of the affiliate system by allowing for more granular control over fee sharing based on specific addresses.protocol/x/affiliates/keeper/grpc_query.go (1)
5-5
: LGTM!The new
AffiliateWhitelist
method added to theKeeper
struct prepares it for future implementation of the affiliate whitelist feature. The method signature and return types are correct, and the placeholder comment and error are appropriate for an unimplemented method.Also applies to: 78-82
proto/dydxprotocol/affiliates/query.proto (1)
19-21
: LGTM!The code changes that introduce the new
AffiliateWhitelist
RPC method, modify theAffiliateInfoResponse
message structure, and define new message typesAffiliateWhitelistRequest
andAffiliateWhitelistResponse
are well-structured, follow the existing style and conventions, and enhance the functionality of the affiliate query system by allowing for the retrieval of whitelist information and including new relevant data in the affiliate information response.Also applies to: 33-40, 42-42, 48-48, 76-84
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1)
4-4
: LGTM!The code changes that add the
affiliateWhitelist
method to theQuery
interface andQueryClientImpl
class are well-structured and follow the existing patterns in the file. The new method is properly integrated and the changes are approved.Also applies to: 16-18, 28-28, 49-53, 70-73
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (1)
39-48
: LGTM!The code changes that introduce the
AffiliateWhitelist
andAffiliateWhitelist_Tier
interfaces along with their corresponding SDK types, and the new functions to create, encode, decode, and convert these interfaces are well-organized and follow the existing code structure. The changes enhance the functionality of the affiliate system by introducing the whitelist feature and are approved.Also applies to: 49-58, 59-67, 68-76, 186-192, 194-231, 233-238, 240-285
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1)
1-1
: LGTM!The code changes that add the
isWhitelisted
property to theAffiliateInfoResponse
interface and its SDK type, update the encoding and decoding logic to handle the new property, and introduce new interfaces and functions for the affiliate whitelist request and response are well-structured and follow the existing patterns in the file. The changes are properly implemented and are approved.Also applies to: 26-37, 53-64, 128-155, 204-216, 219-223, 227-231, 247-260, 277-277, 454-488, 490-532
Changelist
Per changes here
Test Plan
[Describe how this PR was tested (if applicable)]
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
New Features
Bug Fixes
Documentation