-
Notifications
You must be signed in to change notification settings - Fork 104
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-689] add protos for affiliates #2112
Conversation
Caution Review failedThe pull request is closed. WalkthroughThis update enhances the affiliate management system within the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant AffiliateService
participant Database
Client->>AffiliateService: Query affiliate data
AffiliateService->>Database: Fetch affiliate information
Database-->>AffiliateService: Return affiliate data
AffiliateService-->>Client: Return queried affiliate information
sequenceDiagram
participant Client
participant MsgService
participant Database
Client->>MsgService: Register new affiliate
MsgService->>Database: Store affiliate registration
Database-->>MsgService: Confirm registration
MsgService-->>Client: Registration success
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 as PR comments)
Additionally, you can add 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: 4
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
protocol/indexer/events/events.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/affiliates.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (14)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (2 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (8 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/google/bundle.ts (1 hunks)
- proto/dydxprotocol/affiliates/affiliates.proto (1 hunks)
- proto/dydxprotocol/affiliates/query.proto (1 hunks)
- proto/dydxprotocol/affiliates/tx.proto (1 hunks)
- proto/dydxprotocol/indexer/events/events.proto (2 hunks)
Files skipped from review due to trivial changes (1)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (41)
indexer/packages/v4-protos/src/codegen/google/bundle.ts (1)
1-14
: Verify the impact of import changes on the codebase.The reordering and modification of imports affect the
api
andprotobuf
exports. Ensure that these changes do not break existing functionality or dependencies in other parts of the codebase.Run the following script to check for any usage of the affected imports:
Verification successful
Verification Successful: Import Changes Do Not Impact Codebase Negatively
The import changes in
indexer/packages/v4-protos/src/codegen/google/bundle.ts
involving_127
are consistent with its usage. The reference to_121
is irrelevant to this file and does not affect theapi
andprotobuf
exports. No issues were found regarding the functionality or dependencies in the codebase.
_127
is correctly used ingoogle/bundle.ts
._121
is unrelated to the changes ingoogle/bundle.ts
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify usage of affected imports in the codebase. # Test: Search for usage of _121 and _127 in the codebase. Expect: No references to _121 and valid references to _127. rg --type ts '_121|_127'Length of output: 375
proto/dydxprotocol/affiliates/affiliates.proto (1)
1-22
: Ensure correct usage of protocol buffer options.The
AffiliateTiers
message and its nestedTier
message are well-structured. Verify that the use ofgogoproto.nullable
aligns with your intended serialization behavior.Ensure that the
gogoproto.nullable
option is correctly applied and does not conflict with other serialization settings.indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1)
8-8
: Verify integration of theaffiliates
property.The addition of the
affiliates
property in thecreateRPCMsgClient
function integrates affiliate-related functionality. Ensure that this integration is seamless and does not disrupt existing functionality.Check for any existing tests or usage of
createRPCMsgClient
to ensure that the newaffiliates
property is correctly utilized.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts (1)
1-34
: Verify correctness of RPC method implementations.The
MsgClientImpl
class provides methods for handling affiliate-related messages. Ensure that the RPC requests and responses are correctly implemented and tested.Check for any existing tests or examples of using
MsgClientImpl
to ensure that the methods are functioning as expected.proto/dydxprotocol/affiliates/tx.proto (1)
12-46
: Verify implementation of new service methods and message types.The new service methods and message types enhance the protocol's capabilities for managing affiliate relationships. Ensure that the message definitions and RPC methods are correctly implemented and tested.
Check for any existing tests or documentation that validate the new service methods and message types.
proto/dydxprotocol/affiliates/query.proto (7)
4-6
: Ensure imported protos are necessary.Verify that all imported proto files are required for the definitions in this file. Unused imports can be removed to keep the file clean.
12-19
: Review RPC method definitions for completeness.The
Query
service now includes methods for querying affiliate information. Ensure that these methods are correctly implemented in the corresponding server-side code and that they align with the intended functionality.
23-23
: Use of custom scalar type for address.The
AffiliateInfoRequest
message uses a custom scalar type for the address field. Ensure that this type is correctly defined in thecosmos_proto
package and that it meets the requirements for address validation.
34-44
: Custom types for bytes fields.The
AffiliateInfoResponse
message uses custom types forreferred_volume
andstaked_amount
. Ensure that these custom types are correctly implemented and that they provide the necessary functionality for serialization and deserialization.
50-50
: Use of custom scalar type for address.The
ReferredByRequest
message uses a custom scalar type for the address field. Ensure that this type is correctly defined in thecosmos_proto
package and that it meets the requirements for address validation.
55-56
: Use of custom scalar type for affiliate address.The
ReferredByResponse
message uses a custom scalar type for the affiliate address field. Ensure that this type is correctly defined in thecosmos_proto
package and that it meets the requirements for address validation.
67-67
: Non-nullable field in response message.The
AllAffiliateTiersResponse
message includes a non-nullable field fortiers
. Ensure that the server-side implementation correctly populates this field and handles cases where no tiers are available.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (6)
9-15
: Ensure correct implementation of Query methods.The
Query
interface now includes methods for querying affiliate information. Ensure that these methods are correctly implemented and that they handle all edge cases, such as invalid requests or network errors.
22-25
: Binding methods in constructor.The methods in
QueryClientImpl
are bound in the constructor. This is a good practice to ensure the correct context when the methods are called. Ensure that this pattern is consistently used across similar implementations.
27-31
: Review encoding and decoding logic.The
affiliateInfo
method includes encoding and decoding logic for Protobuf messages. Ensure that this logic is correctly implemented and that it handles all possible edge cases, such as malformed data or unexpected message formats.
33-37
: Review encoding and decoding logic.The
referredBy
method includes encoding and decoding logic for Protobuf messages. Ensure that this logic is correctly implemented and that it handles all possible edge cases, such as malformed data or unexpected message formats.
39-42
: Review encoding and decoding logic.The
allAffiliateTiers
method includes encoding and decoding logic for Protobuf messages. Ensure that this logic is correctly implemented and that it handles all possible edge cases, such as malformed data or unexpected message formats.
49-60
: Ensure correct implementation of RPC query extension.The
createRpcQueryExtension
function exposes the new query methods. Ensure that this function is correctly implemented and that it integrates seamlessly with the broader application context.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (6)
5-8
: Ensure affiliate tiers are correctly defined.The
AffiliateTiers
interface defines the structure for affiliate tiers. Ensure that the tiers are correctly populated and sorted as expected in the application logic.
17-29
: Review tier structure and properties.The
AffiliateTiers_Tier
interface defines properties for each tier. Ensure that these properties are correctly used and validated in the application logic, particularly the numeric fields likelevel
andtakerFeeSharePpm
.
52-59
: Review encoding logic for AffiliateTiers.The
encode
method forAffiliateTiers
ensures that all tiers are serialized correctly. Verify that this method handles all edge cases, such as empty tiers or invalid data.
61-80
: Review decoding logic for AffiliateTiers.The
decode
method forAffiliateTiers
reconstructs the message from serialized data. Ensure that this method handles all edge cases, such as malformed data or unexpected message formats.
100-118
: Review encoding logic for AffiliateTiers_Tier.The
encode
method forAffiliateTiers_Tier
ensures that each tier is serialized correctly. Verify that this method handles all edge cases, such as default values or missing fields.
121-152
: Review decoding logic for AffiliateTiers_Tier.The
decode
method forAffiliateTiers_Tier
reconstructs the message from serialized data. Ensure that this method handles all edge cases, such as malformed data or unexpected message formats.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (6)
6-12
: Ensure correct definition of MsgRegisterAffiliate.The
MsgRegisterAffiliate
interface defines the structure for registering affiliate relationships. Ensure that the fields are correctly populated and validated in the application logic.
30-36
: Ensure correct definition of MsgUpdateAffiliateTiers.The
MsgUpdateAffiliateTiers
interface defines the structure for updating affiliate tiers. Ensure that the fields are correctly populated and validated in the application logic.
60-70
: Review encoding logic for MsgRegisterAffiliate.The
encode
method forMsgRegisterAffiliate
ensures that the message is serialized correctly. Verify that this method handles all edge cases, such as default values or missing fields.
73-96
: Review decoding logic for MsgRegisterAffiliate.The
decode
method forMsgRegisterAffiliate
reconstructs the message from serialized data. Ensure that this method handles all edge cases, such as malformed data or unexpected message formats.
150-159
: Review encoding logic for MsgUpdateAffiliateTiers.The
encode
method forMsgUpdateAffiliateTiers
ensures that the message is serialized correctly. Verify that this method handles all edge cases, such as default values or missing fields.
162-185
: Review decoding logic for MsgUpdateAffiliateTiers.The
decode
method forMsgUpdateAffiliateTiers
reconstructs the message from serialized data. Ensure that this method handles all edge cases, such as malformed data or unexpected message formats.indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (3)
3-6
: Verify module reorganization.The imports for the
affiliates
module have been updated. Ensure that these changes align with the intended module structure and that all necessary components are correctly imported.
180-184
: Ensure correct export of affiliates module.The
affiliates
module is now aggregated from multiple sources. Verify that all necessary components are included and that the export aligns with the intended functionality.
380-382
: Review ClientFactory export.The
ClientFactory
export has been updated to include new imports. Ensure that these changes reflect the intended enhancements or adjustments in client creation logic.proto/dydxprotocol/indexer/events/events.proto (2)
167-168
: Addition ofaffiliate_rev_share
field inOrderFillEventV1
.The new field
affiliate_rev_share
is added to track the revenue share for affiliates. Ensure this field is correctly integrated into any logic that processesOrderFillEventV1
.
586-593
: Introduction ofRegisterAffiliateEventV1
message.The new message
RegisterAffiliateEventV1
is introduced to handle affiliate registration events. Ensure this message is integrated into the event processing logic and is correctly serialized/deserialized.indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (6)
418-420
: Addition ofaffiliateRevShare
inOrderFillEventV1
.The new property
affiliateRevShare
is added to the interface. Ensure that this property is correctly handled in any logic that processesOrderFillEventV1
.
450-452
: Addition ofaffiliate_rev_share
inOrderFillEventV1SDKType
.The new property
affiliate_rev_share
is added to the SDK type. Ensure that this property is correctly handled in any logic that processesOrderFillEventV1SDKType
.
1488-1499
: Introduction ofRegisterAffiliateEventV1
interface.The new interface
RegisterAffiliateEventV1
is introduced to handle affiliate registration events. Ensure this interface is integrated into the event processing logic and is correctly serialized/deserialized.
1502-1511
: Introduction ofRegisterAffiliateEventV1SDKType
interface.The new interface
RegisterAffiliateEventV1SDKType
is introduced to handle affiliate registration events in SDK types. Ensure this interface is integrated into the event processing logic and is correctly serialized/deserialized.
3758-3764
: Base function forRegisterAffiliateEventV1
.The function
createBaseRegisterAffiliateEventV1
initializes theRegisterAffiliateEventV1
structure. Ensure that default values are appropriate and consistent with the rest of the system.
3766-3820
: Encoding and decoding functions forRegisterAffiliateEventV1
.The encoding and decoding functions ensure that
RegisterAffiliateEventV1
is correctly serialized and deserialized. Verify that these functions are integrated into the system where necessary.
*/ | ||
|
||
export interface AllAffiliateTiersRequest {} |
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.
Use a type alias instead of an empty interface.
The AllAffiliateTiersRequest
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface AllAffiliateTiersRequest {}
+ export type AllAffiliateTiersRequest = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface AllAffiliateTiersRequest {} | |
export type AllAffiliateTiersRequest = {}; |
Tools
Biome
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
* RPC method. | ||
*/ | ||
|
||
export interface AllAffiliateTiersRequestSDKType {} |
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.
Use a type alias instead of an empty interface.
The AllAffiliateTiersRequestSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface AllAffiliateTiersRequestSDKType {}
+ export type AllAffiliateTiersRequestSDKType = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface AllAffiliateTiersRequestSDKType {} | |
export type AllAffiliateTiersRequestSDKType = {}; |
Tools
Biome
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
70a6437
to
754243d
Compare
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: 1
Outside diff range, codebase verification and nitpick comments (3)
proto/dydxprotocol/affiliates/tx.proto (2)
12-19
: Add comments for clarity on RPC methods.The RPC methods
RegisterAffiliate
andUpdateAffiliateTiers
are well-defined. Consider adding more detailed comments to explain the expected behavior and use cases for these methods.// RegisterAffiliate registers a referee-affiliate relationship + // This method establishes a link between a referee and an affiliate, allowing for tracking and management of affiliate activities. rpc RegisterAffiliate(MsgRegisterAffiliate) returns (MsgRegisterAffiliateResponse); // UpdateAffiliateTiers updates affiliate tiers + // This method allows the modification of existing affiliate tiers, enabling dynamic adjustments to affiliate structures. rpc UpdateAffiliateTiers(MsgUpdateAffiliateTiers) returns (MsgUpdateAffiliateTiersResponse);
37-42
: Clarify the purpose ofauthority
inMsgUpdateAffiliateTiers
.The
authority
field is crucial for governance-related actions. Ensure that the documentation clearly states its role and any constraints on its use.// Authority sending this message. Will be sent by gov + // This field should contain the address authorized to make governance changes, ensuring that only valid entities can update affiliate tiers. string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
proto/dydxprotocol/affiliates/query.proto (1)
11-19
: Add comments for clarity on RPC methods.The RPC methods
AffiliateInfo
,ReferredBy
, andAllAffiliateTiers
are well-defined. Consider adding more detailed comments to explain the expected behavior and use cases for these methods.// Query AffiliateInfo returns the affiliate info for a given address. + // This method retrieves detailed information about an affiliate, including tier and financial metrics. rpc AffiliateInfo(AffiliateInfoRequest) returns (AffiliateInfoResponse); // Query ReferredBy returns the affiliate that referred a given address. + // This method identifies the affiliate responsible for referring a specific address, aiding in tracking referral chains. rpc ReferredBy(ReferredByRequest) returns (ReferredByResponse); // Query AllAffiliateTiers returns all affiliate tiers. + // This method provides a comprehensive list of all defined affiliate tiers, useful for understanding the affiliate structure. rpc AllAffiliateTiers(AllAffiliateTiersRequest) returns (AllAffiliateTiersResponse);
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
protocol/indexer/events/events.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/affiliates.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (14)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (2 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (8 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/google/bundle.ts (1 hunks)
- proto/dydxprotocol/affiliates/affiliates.proto (1 hunks)
- proto/dydxprotocol/affiliates/query.proto (1 hunks)
- proto/dydxprotocol/affiliates/tx.proto (1 hunks)
- proto/dydxprotocol/indexer/events/events.proto (2 hunks)
Files skipped from review due to trivial changes (2)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts
- proto/dydxprotocol/affiliates/affiliates.proto
Files skipped from review as they are similar to previous changes (6)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts
- indexer/packages/v4-protos/src/codegen/google/bundle.ts
- proto/dydxprotocol/indexer/events/events.proto
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (16)
proto/dydxprotocol/affiliates/tx.proto (1)
21-31
: Ensure message options are necessary.The
MsgRegisterAffiliate
message includes options forcosmos.msg.v1.signer
,gogoproto.equal
, andgogoproto.goproto_getters
. Verify that these options are required for your use case.If these options are not necessary, consider removing them to simplify the message definition.
proto/dydxprotocol/affiliates/query.proto (1)
28-45
: Ensure custom types are necessary.The
AffiliateInfoResponse
message uses custom types forreferred_volume
andstaked_amount
. Verify that these custom types are necessary and correctly implemented.If simpler types can be used without losing functionality, consider simplifying the message definition.
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (2)
7-16
: Ensure method names reflect functionality.The method names
affiliateInfo
,referredBy
, andallAffiliateTiers
are descriptive. Ensure they accurately reflect the functionality and are consistent with naming conventions in the rest of the codebase.If there are any inconsistencies, consider renaming the methods for clarity.
22-25
: Bind methods in the constructor.Binding methods in the constructor ensures the correct context when they are called. This is a good practice for maintaining method behavior.
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (4)
24-27
: Use type alias instead of empty interface.The
MsgRegisterAffiliateResponse
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Tools
Biome
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
48-51
: Use type alias instead of empty interface.The
MsgUpdateAffiliateTiersResponse
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Tools
Biome
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
60-71
: Ensure encoding logic is robust.The encoding logic for
MsgRegisterAffiliate
is straightforward. Ensure that all fields are correctly encoded and that any necessary validation is performed before encoding.If there are any additional constraints or validations, consider implementing them before encoding.
150-160
: Ensure encoding logic is robust.The encoding logic for
MsgUpdateAffiliateTiers
is straightforward. Ensure that all fields are correctly encoded and that any necessary validation is performed before encoding.If there are any additional constraints or validations, consider implementing them before encoding.
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (4)
85-85
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequest
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
91-91
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequestSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
118-124
: Ensure encoding logic is robust.The encoding logic for
AffiliateInfoRequest
is straightforward. Ensure that all fields are correctly encoded and that any necessary validation is performed before encoding.If there are any additional constraints or validations, consider implementing them before encoding.
166-184
: Ensure encoding logic is robust.The encoding logic for
AffiliateInfoResponse
is straightforward. Ensure that all fields are correctly encoded and that any necessary validation is performed before encoding.If there are any additional constraints or validations, consider implementing them before encoding.
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (4)
418-420
: Addition ofaffiliateRevShare
is appropriate.The new property
affiliateRevShare
in theOrderFillEventV1
interface correctly extends the data structure to include affiliate revenue sharing information.
450-452
: Addition ofaffiliate_rev_share
is consistent.The new property
affiliate_rev_share
in theOrderFillEventV1SDKType
interface ensures consistency with theOrderFillEventV1
interface.
1488-1498
: Introduction ofRegisterAffiliateEventV1
is well-structured.The new interface
RegisterAffiliateEventV1
effectively captures the necessary details for affiliate registration events.
3766-3819
: Encoding and decoding functions forRegisterAffiliateEventV1
are correctly implemented.The functions handle the serialization and deserialization of
RegisterAffiliateEventV1
data appropriately.
affiliateInfo(request: AffiliateInfoRequest): Promise<AffiliateInfoResponse> { | ||
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<ReferredByResponse> { | ||
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<AllAffiliateTiersResponse> { | ||
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))); |
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.
Handle potential errors in RPC requests.
Ensure that potential errors in the RPC requests are handled appropriately, possibly by adding error handling logic or comments indicating how errors should be managed.
Consider adding try-catch blocks or similar error handling mechanisms to manage potential errors in the RPC requests.
88882b4
to
342081c
Compare
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.
Caution
Inline review comments failed to post
Actionable comments posted: 7
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
protocol/indexer/events/events.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/affiliates.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (20)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (2 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (8 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/google/bundle.ts (1 hunks)
- indexer/services/ender/tests/helpers/constants.ts (4 hunks)
- indexer/services/ender/src/helpers/translation-helper.ts (3 hunks)
- indexer/services/ender/src/lib/translated-types.ts (1 hunks)
- indexer/services/ender/src/lib/types.ts (2 hunks)
- proto/dydxprotocol/affiliates/affiliates.proto (1 hunks)
- proto/dydxprotocol/affiliates/query.proto (1 hunks)
- proto/dydxprotocol/affiliates/tx.proto (1 hunks)
- proto/dydxprotocol/indexer/events/events.proto (2 hunks)
- protocol/x/affiliates/keeper/grpc_query.go (1 hunks)
- protocol/x/affiliates/keeper/msg_server.go (1 hunks)
Files skipped from review due to trivial changes (2)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts
- proto/dydxprotocol/affiliates/affiliates.proto
Files skipped from review as they are similar to previous changes (8)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts
- indexer/packages/v4-protos/src/codegen/google/bundle.ts
- proto/dydxprotocol/affiliates/query.proto
- proto/dydxprotocol/affiliates/tx.proto
- proto/dydxprotocol/indexer/events/events.proto
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (29)
indexer/services/ender/src/lib/translated-types.ts (1)
37-38
: Verify integration ofaffiliateRevShare
.The
affiliateRevShare
property has been added to theOrderFillWithLiquidity
interface. Ensure that all code interacting with this interface is updated to handle this new property.Run the following script to verify the usage of
affiliateRevShare
:Verification successful
Integration of
affiliateRevShare
VerifiedThe
affiliateRevShare
property is integrated into various parts of the codebase, indicating that it is being handled appropriately. Here are some key locations where it is used:
- Protobuf Definition:
protocol/indexer/events/events.pb.go
- TypeScript Codegen:
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts
- Test Constants:
indexer/services/ender/__tests__/helpers/constants.ts
- Translation Helper:
indexer/services/ender/src/helpers/translation-helper.ts
- Type Definitions:
indexer/services/ender/src/lib/types.ts
andindexer/services/ender/src/lib/translated-types.ts
These references suggest that the property is being utilized across different components, including serialization, testing, and helper functions.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `affiliateRevShare` in the codebase. # Test: Search for occurrences of `affiliateRevShare`. Expect: Proper handling in all relevant code. rg --type typescript 'affiliateRevShare'Length of output: 75
Script:
#!/bin/bash # Description: Verify the usage of `affiliateRevShare` in the codebase. # Test: Search for occurrences of `affiliateRevShare`. Expect: Proper handling in all relevant code. rg 'affiliateRevShare'Length of output: 2029
indexer/services/ender/src/helpers/translation-helper.ts (1)
29-29
: Verify integration ofaffiliateRevShare
parameter.The
affiliateRevShare
parameter has been added to several functions. Ensure that the parameter is correctly integrated and utilized in the business logic.Run the following script to verify the usage of
affiliateRevShare
in the functions:Also applies to: 44-44, 59-59
Verification successful
affiliateRevShare
Parameter Integration VerifiedThe
affiliateRevShare
parameter is well-integrated into the codebase, appearing in type definitions, helper functions, and test files. This comprehensive integration suggests that the parameter is correctly utilized and its functionality is being validated through tests.
- Files Involved:
indexer/services/ender/src/helpers/translation-helper.ts
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts
indexer/services/ender/src/lib/types.ts
indexer/services/ender/__tests__/helpers/constants.ts
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `affiliateRevShare` in the functions. # Test: Search for function definitions and usages involving `affiliateRevShare`. Expect: Proper handling in all relevant code. rg --type typescript 'affiliateRevShare'Length of output: 75
Script:
#!/bin/bash # Description: Verify the usage of `affiliateRevShare` in the functions. # Test: Search for function definitions and usages involving `affiliateRevShare`. Expect: Proper handling in all relevant code. rg --type ts 'affiliateRevShare'Length of output: 1858
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1)
27-42
: Acknowledge existing comments on error handling.Ensure that potential errors in the RPC requests are handled appropriately, as suggested in previous comments.
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (6)
6-12
: LGTM!The
MsgRegisterAffiliate
interface is well-defined and aligns with the expected structure.
15-21
: LGTM!The
MsgRegisterAffiliateSDKType
interface is well-defined and aligns with the expected structure.
24-24
: Replace empty interfaces with type aliases.The
MsgRegisterAffiliateResponse
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Also applies to: 26-26
Tools
Biome
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
30-36
: LGTM!The
MsgUpdateAffiliateTiers
interface is well-defined and aligns with the expected structure.
39-45
: LGTM!The
MsgUpdateAffiliateTiersSDKType
interface is well-defined and aligns with the expected structure.
48-48
: Replace empty interfaces with type aliases.The
MsgUpdateAffiliateTiersResponse
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Also applies to: 50-50
Tools
Biome
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
indexer/services/ender/src/lib/types.ts (2)
198-199
: LGTM!The addition of
affiliateRevShare
toOrderFillEventWithOrder
enhances the type by including affiliate revenue sharing information.
209-210
: LGTM!The addition of
affiliateRevShare
toOrderFillEventWithLiquidation
enhances the type by including affiliate revenue sharing information.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (12)
9-11
: LGTM!The
AffiliateInfoRequest
interface is well-defined and aligns with the expected structure.
17-19
: LGTM!The
AffiliateInfoRequestSDKType
interface is well-defined and aligns with the expected structure.
25-37
: LGTM!The
AffiliateInfoResponse
interface is well-defined and aligns with the expected structure.
43-55
: LGTM!The
AffiliateInfoResponseSDKType
interface is well-defined and aligns with the expected structure.
58-61
: LGTM!The
ReferredByRequest
interface is well-defined and aligns with the expected structure.
64-67
: LGTM!The
ReferredByRequestSDKType
interface is well-defined and aligns with the expected structure.
70-73
: LGTM!The
ReferredByResponse
interface is well-defined and aligns with the expected structure.
76-79
: LGTM!The
ReferredByResponseSDKType
interface is well-defined and aligns with the expected structure.
85-85
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequest
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
91-91
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequestSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
97-100
: LGTM!The
AllAffiliateTiersResponse
interface is well-defined and aligns with the expected structure.
106-109
: LGTM!The
AllAffiliateTiersResponseSDKType
interface is well-defined and aligns with the expected structure.indexer/services/ender/__tests__/helpers/constants.ts (4)
283-284
: LGTM!The addition of
affiliateRevShare
todefaultOrderEvent
enhances the constant by including affiliate revenue sharing information.
293-294
: LGTM!The addition of
affiliateRevShare
todefaultOrder
enhances the constant by including affiliate revenue sharing information.
303-304
: LGTM!The addition of
affiliateRevShare
todefaultLiquidationEvent
enhances the constant by including affiliate revenue sharing information.
313-314
: LGTM!The addition of
affiliateRevShare
todefaultLiquidation
enhances the constant by including affiliate revenue sharing information.indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (2)
418-420
: LGTM!The addition of
affiliateRevShare
toOrderFillEventV1
enhances the interface by including affiliate revenue sharing information.
1490-1499
: LGTM!The
RegisterAffiliateEventV1
interface is well-defined and aligns with the expected structure.
Comments failed to post (7)
protocol/x/affiliates/keeper/grpc_query.go
11-13: Implement the
AffiliateInfo
method.The
AffiliateInfo
method is currently a stub. Implement the logic to handle affiliate information queries.Would you like assistance in drafting the implementation for this method?
15-17: Implement the
ReferredBy
method.The
ReferredBy
method is currently a stub. Implement the logic to handle queries for affiliates that referred a given address.Would you like assistance in drafting the implementation for this method?
19-21: Implement the
AllAffiliateTiers
method.The
AllAffiliateTiers
method is currently a stub. Implement the logic to handle queries for all affiliate tiers.Would you like assistance in drafting the implementation for this method?
protocol/x/affiliates/keeper/msg_server.go
14-16: Implement the
RegisterAffiliate
method.The
RegisterAffiliate
method is currently a stub. Implement the logic to handle affiliate registration.Would you like assistance in drafting the implementation for this method?
18-20: Implement the
UpdateAffiliateTiers
method.The
UpdateAffiliateTiers
method is currently a stub. Implement the logic to handle updates to affiliate tiers.Would you like assistance in drafting the implementation for this method?
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts
27-27: Replace empty interfaces with type aliases.
The
MsgRegisterAffiliateResponseSDKType
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Replace the interface with a type alias:
- export interface MsgRegisterAffiliateResponseSDKType {} + export type MsgRegisterAffiliateResponseSDKType = {};Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.export type MsgRegisterAffiliateResponseSDKType = {};
Tools
Biome
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
51-51: Replace empty interfaces with type aliases.
The
MsgUpdateAffiliateTiersResponseSDKType
interface is empty. Consider using a type alias instead, as suggested by static analysis tools.Replace the interface with a type alias:
- export interface MsgUpdateAffiliateTiersResponseSDKType {} + export type MsgUpdateAffiliateTiersResponseSDKType = {};Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.export type MsgUpdateAffiliateTiersResponseSDKType = {};
Tools
Biome
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
@@ -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. |
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.
emitted
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: 6
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
protocol/indexer/events/events.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/affiliates.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/query.pb.go
is excluded by!**/*.pb.go
protocol/x/affiliates/types/tx.pb.go
is excluded by!**/*.pb.go
Files selected for processing (23)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts (2 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (8 hunks)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts (1 hunks)
- indexer/packages/v4-protos/src/codegen/google/bundle.ts (1 hunks)
- indexer/services/ender/tests/handlers/order-fills/liquidation-handler.test.ts (2 hunks)
- indexer/services/ender/tests/handlers/order-fills/order-handler.test.ts (2 hunks)
- indexer/services/ender/tests/helpers/constants.ts (4 hunks)
- indexer/services/ender/src/helpers/translation-helper.ts (3 hunks)
- indexer/services/ender/src/lib/translated-types.ts (1 hunks)
- indexer/services/ender/src/lib/types.ts (2 hunks)
- proto/dydxprotocol/affiliates/affiliates.proto (1 hunks)
- proto/dydxprotocol/affiliates/query.proto (1 hunks)
- proto/dydxprotocol/affiliates/tx.proto (1 hunks)
- proto/dydxprotocol/indexer/events/events.proto (2 hunks)
- protocol/app/basic_manager/basic_manager.go (2 hunks)
- protocol/x/affiliates/keeper/grpc_query.go (1 hunks)
- protocol/x/affiliates/keeper/msg_server.go (1 hunks)
Files skipped from review due to trivial changes (3)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/affiliates.ts
- indexer/packages/v4-protos/src/codegen/gogoproto/bundle.ts
- indexer/packages/v4-protos/src/codegen/google/bundle.ts
Files skipped from review as they are similar to previous changes (11)
- indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.rpc.msg.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/bundle.ts
- indexer/packages/v4-protos/src/codegen/dydxprotocol/rpc.tx.ts
- indexer/services/ender/tests/helpers/constants.ts
- indexer/services/ender/src/helpers/translation-helper.ts
- indexer/services/ender/src/lib/translated-types.ts
- indexer/services/ender/src/lib/types.ts
- proto/dydxprotocol/affiliates/affiliates.proto
- proto/dydxprotocol/affiliates/tx.proto
- proto/dydxprotocol/indexer/events/events.proto
- protocol/x/affiliates/keeper/grpc_query.go
Additional context used
Biome
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
Additional comments not posted (49)
protocol/x/affiliates/keeper/msg_server.go (1)
13-20
: VerifyMsgServer
interface implementation.Ensure that the
msgServer
struct correctly implements theMsgServer
interface.Run the following script to verify the interface implementation:
Verification successful
msgServer
correctly implements theMsgServer
interface.The
msgServer
struct in theaffiliates
module implements all required methods of theMsgServer
interface, confirming correct implementation.
RegisterAffiliate
UpdateAffiliateTiers
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `msgServer` implements the `MsgServer` interface. # Test: Search for the `MsgServer` interface definition. Expect: `msgServer` implements all methods. ast-grep --lang go --pattern 'interface MsgServer { $$$ }'Length of output: 405
Script:
#!/bin/bash # Search for the definition of the MsgServer interface and list its methods. ast-grep --lang go --pattern 'interface MsgServer { $$$ }' # Search for the implementation of the msgServer struct to verify its methods. ast-grep --lang go --pattern 'type msgServer struct { $$$ }'Length of output: 3507
Script:
#!/bin/bash # Search for the MsgServer interface definition with a refined pattern to capture its methods. rg 'type MsgServer interface' -A 10 # Search for the methods implemented by the msgServer struct in the affiliates module. rg 'func (k msgServer) ' protocol/x/affiliates/keeper/msg_server.goLength of output: 17039
proto/dydxprotocol/affiliates/query.proto (3)
34-44
: Verify custom typeSerializableInt
usage.Ensure that the custom type
SerializableInt
is correctly used and defined in the codebase.Run the following script to verify the custom type usage:
Verification successful
Custom type
SerializableInt
is correctly used and defined.The custom type
SerializableInt
is well-integrated into the codebase, with its definition and multiple usages confirmed across various files. The struct is defined inprotocol/dtypes/serializable_int.go
and is utilized in several protobuf and Go source files, indicating correct implementation.
- Definition:
protocol/dtypes/serializable_int.go
- Usages: Various files including protobuf and Go source files
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of custom type `SerializableInt`. # Test: Search for the definition and usage of `SerializableInt`. Expect: Correct definition and usage. rg --type go 'SerializableInt'Length of output: 19429
23-24
: Ensure correct address type usage.The
AffiliateInfoRequest
uses a custom scalar for the address. Verify that this matches the expected address format.Run the following script to verify the address type usage:
Verification successful
Correct Address Type Usage Verified
The
AffiliateInfoRequest
and other relevant messages correctly use thecosmos.AddressString
scalar for address fields, matching the expected format. No issues found.
AffiliateInfoRequest
usescosmos.AddressString
for theaddress
field.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of custom scalar for address. # Test: Search for the address type usage. Expect: Correct usage of "cosmos.AddressString". rg --type proto --context 3 'cosmos.AddressString'Length of output: 80
Script:
#!/bin/bash # Description: Verify the usage of custom scalar for address in .proto files. # Find all .proto files and search for the usage of "cosmos.AddressString". fd --extension proto --exec rg --context 3 'cosmos.AddressString' {}Length of output: 14284
4-5
: Verify import usage for custom options.Ensure that the imported
cosmos.proto
andgogo.proto
files are correctly used for defining custom options.Run the following script to verify the import usage:
Verification successful
Custom Options Usage Verified
The imported
cosmos.proto
andgogo.proto
files are correctly used for defining custom options inproto/dydxprotocol/affiliates/query.proto
. The usage ofcosmos_proto.scalar
andgogoproto.customtype
is evident in the message definitions.
cosmos_proto.scalar
is used withstring address
fields.gogoproto.customtype
is used withbytes referred_volume
andbytes staked_amount
fields.These usages confirm that the custom options are correctly implemented.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of imported proto files for custom options. # Test: Search for the usage of custom options. Expect: Correct usage of cosmos and gogo options. rg --type proto --context 3 'cosmos_proto.scalar|gogoproto.customtype'Length of output: 102
Script:
#!/bin/bash # Description: Verify the usage of imported proto files for custom options. # Test: Search for the usage of custom options. Expect: Correct usage of cosmos and gogo options. rg --context 3 'cosmos_proto.scalar|gogoproto.customtype' -- '*.proto'Length of output: 120
Script:
#!/bin/bash # Description: Locate .proto files in the repository. # Find all .proto files in the repository fd --extension protoLength of output: 4972
Script:
#!/bin/bash # Description: Verify the usage of imported proto files for custom options. # Test: Search for the usage of custom options. Expect: Correct usage of cosmos and gogo options. rg --context 3 'cosmos_proto.scalar|gogoproto.customtype' proto/dydxprotocol/affiliates/query.protoLength of output: 1439
indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.rpc.Query.ts (1)
27-42
: Verify error handling in RPC requests.Ensure that potential errors in the RPC requests are handled appropriately.
Run the following script to verify error handling:
protocol/app/basic_manager/basic_manager.go (2)
27-27
: New import statement foraffiliatesmodule
.The import statement for
affiliatesmodule
has been added, which is consistent with the integration of affiliate-related functionalities.
105-105
: Addedaffiliatesmodule.AppModuleBasic
toModuleBasics
.The
affiliatesmodule.AppModuleBasic
is now part ofModuleBasics
, allowing the application to handle affiliate-related operations.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/tx.ts (12)
6-12
: New interfaceMsgRegisterAffiliate
.The
MsgRegisterAffiliate
interface defines the structure for registering a referee-affiliate relationship.
15-21
: New interfaceMsgRegisterAffiliateSDKType
.The
MsgRegisterAffiliateSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
30-36
: New interfaceMsgUpdateAffiliateTiers
.The
MsgUpdateAffiliateTiers
interface defines the structure for updating affiliate tiers, including an optionaltiers
property.
39-45
: New interfaceMsgUpdateAffiliateTiersSDKType
.The
MsgUpdateAffiliateTiersSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
53-58
: Helper functioncreateBaseMsgRegisterAffiliate
.The function initializes a
MsgRegisterAffiliate
instance with default values.
60-106
: Encoding, decoding, and partial methods forMsgRegisterAffiliate
.These methods handle the serialization and deserialization of
MsgRegisterAffiliate
messages, ensuring proper communication.
108-110
: Helper functioncreateBaseMsgRegisterAffiliateResponse
.The function initializes a
MsgRegisterAffiliateResponse
instance, which is currently empty.
112-140
: Encoding, decoding, and partial methods forMsgRegisterAffiliateResponse
.These methods handle the serialization and deserialization of
MsgRegisterAffiliateResponse
messages, even though the response is empty.
142-147
: Helper functioncreateBaseMsgUpdateAffiliateTiers
.The function initializes a
MsgUpdateAffiliateTiers
instance with default values.
149-195
: Encoding, decoding, and partial methods forMsgUpdateAffiliateTiers
.These methods handle the serialization and deserialization of
MsgUpdateAffiliateTiers
messages, ensuring proper communication.
197-199
: Helper functioncreateBaseMsgUpdateAffiliateTiersResponse
.The function initializes a
MsgUpdateAffiliateTiersResponse
instance, which is currently empty.
201-229
: Encoding, decoding, and partial methods forMsgUpdateAffiliateTiersResponse
.These methods handle the serialization and deserialization of
MsgUpdateAffiliateTiersResponse
messages, even though the response is empty.indexer/packages/v4-protos/src/codegen/dydxprotocol/affiliates/query.ts (24)
9-11
: New interfaceAffiliateInfoRequest
.The
AffiliateInfoRequest
interface defines the structure for requesting affiliate information.
17-19
: New interfaceAffiliateInfoRequestSDKType
.The
AffiliateInfoRequestSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
25-37
: New interfaceAffiliateInfoResponse
.The
AffiliateInfoResponse
interface defines the structure for responding with affiliate information, including properties liketier
,feeSharePpm
,referredVolume
, andstakedAmount
.
43-55
: New interfaceAffiliateInfoResponseSDKType
.The
AffiliateInfoResponseSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
58-61
: New interfaceReferredByRequest
.The
ReferredByRequest
interface defines the structure for querying which affiliate referred a specific address.
64-67
: New interfaceReferredByRequestSDKType
.The
ReferredByRequestSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
70-73
: New interfaceReferredByResponse
.The
ReferredByResponse
interface defines the structure for responding with the affiliate's address that referred the queried address.
76-79
: New interfaceReferredByResponseSDKType
.The
ReferredByResponseSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
85-85
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequest
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 85-85: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
91-91
: Use a type alias instead of an empty interface.The
AllAffiliateTiersRequestSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.Tools
Biome
[error] 91-91: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
97-100
: New interfaceAllAffiliateTiersResponse
.The
AllAffiliateTiersResponse
interface defines the structure for responding with all affiliate tiers information.
106-109
: New interfaceAllAffiliateTiersResponseSDKType
.The
AllAffiliateTiersResponseSDKType
interface is introduced for SDK compatibility, using snake_case for property names.
111-115
: Helper functioncreateBaseAffiliateInfoRequest
.The function initializes an
AffiliateInfoRequest
instance with default values.
117-154
: Encoding, decoding, and partial methods forAffiliateInfoRequest
.These methods handle the serialization and deserialization of
AffiliateInfoRequest
messages, ensuring proper communication.
156-163
: Helper functioncreateBaseAffiliateInfoResponse
.The function initializes an
AffiliateInfoResponse
instance with default values.
165-228
: Encoding, decoding, and partial methods forAffiliateInfoResponse
.These methods handle the serialization and deserialization of
AffiliateInfoResponse
messages, ensuring proper communication.
231-235
: Helper functioncreateBaseReferredByRequest
.The function initializes a
ReferredByRequest
instance with default values.
237-273
: Encoding, decoding, and partial methods forReferredByRequest
.These methods handle the serialization and deserialization of
ReferredByRequest
messages, ensuring proper communication.
276-280
: Helper functioncreateBaseReferredByResponse
.The function initializes a
ReferredByResponse
instance with default values.
282-318
: Encoding, decoding, and partial methods forReferredByResponse
.These methods handle the serialization and deserialization of
ReferredByResponse
messages, ensuring proper communication.
321-323
: Helper functioncreateBaseAllAffiliateTiersRequest
.The function initializes an
AllAffiliateTiersRequest
instance, which is currently empty.
325-353
: Encoding, decoding, and partial methods forAllAffiliateTiersRequest
.These methods handle the serialization and deserialization of
AllAffiliateTiersRequest
messages, even though the request is empty.
355-359
: Helper functioncreateBaseAllAffiliateTiersResponse
.The function initializes an
AllAffiliateTiersResponse
instance with default values.
361-397
: Encoding, decoding, and partial methods forAllAffiliateTiersResponse
.These methods handle the serialization and deserialization of
AllAffiliateTiersResponse
messages, ensuring proper communication.indexer/services/ender/__tests__/handlers/order-fills/liquidation-handler.test.ts (1)
Line range hint
1182-1192
: Ensure the new parameter is tested.The addition of the
affiliateRevShare
parameter enhances the function's capability to handle affiliate revenue sharing. Ensure that this new functionality is covered by tests to verify its correctness.Consider adding or updating tests to cover the new parameter
affiliateRevShare
.indexer/services/ender/__tests__/handlers/order-fills/order-handler.test.ts (1)
Line range hint
1825-1835
: Ensure the new parameter is tested.The addition of the
affiliateRevShare
parameter enhances the function's capability to handle affiliate revenue sharing. Ensure that this new functionality is covered by tests to verify its correctness.Consider adding or updating tests to cover the new parameter
affiliateRevShare
.indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (4)
418-420
: Verify integration ofaffiliateRevShare
.Ensure that the
affiliateRevShare
property is correctly integrated with the encoding and decoding logic forOrderFillEventV1
.Run the following script to verify the integration:
Verification successful
Integration of
affiliateRevShare
is correct.The
affiliateRevShare
property is properly integrated into the encoding and decoding logic within theevents.ts
file, ensuring it is handled correctly in theOrderFillEventV1
interface. The logic for writing and reading the field is present and consistent.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of `affiliateRevShare` in encoding and decoding logic. # Test: Search for encoding and decoding logic for `affiliateRevShare`. Expect: Correct integration. rg --type ts 'affiliateRevShare'Length of output: 2370
1488-1499
: Verify encoding and decoding logic forRegisterAffiliateEventV1
.Ensure that the encoding and decoding logic for
RegisterAffiliateEventV1
is correctly implemented.Run the following script to verify the encoding and decoding logic:
Verification successful
Encoding and decoding logic for
RegisterAffiliateEventV1
is correctly implemented.The
RegisterAffiliateEventV1
interface has associatedencode
anddecode
methods, confirming that the logic for serialization and deserialization is in place. No issues were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the encoding and decoding logic for `RegisterAffiliateEventV1`. # Test: Search for encoding and decoding logic for `RegisterAffiliateEventV1`. Expect: Correct implementation. rg --type ts 'RegisterAffiliateEventV1'Length of output: 1334
450-452
: Verify integration ofaffiliate_rev_share
.Ensure that the
affiliate_rev_share
property is correctly integrated with the encoding and decoding logic forOrderFillEventV1SDKType
.Run the following script to verify the integration:
1502-1511
: Verify encoding and decoding logic forRegisterAffiliateEventV1SDKType
.Ensure that the encoding and decoding logic for
RegisterAffiliateEventV1SDKType
is correctly implemented.Run the following script to verify the encoding and decoding logic:
func (k msgServer) RegisterAffiliate(ctx context.Context, msg *types.MsgRegisterAffiliate) (*types.MsgRegisterAffiliateResponse, error) { | ||
return nil, nil | ||
} |
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.
Implement the RegisterAffiliate
method.
The RegisterAffiliate
method is currently a stub. Consider implementing the logic for registering an affiliate.
Would you like assistance in implementing this method or opening a GitHub issue to track this task?
func (k msgServer) UpdateAffiliateTiers(ctx context.Context, msg *types.MsgUpdateAffiliateTiers) (*types.MsgUpdateAffiliateTiersResponse, error) { | ||
return nil, nil | ||
} |
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.
Implement the UpdateAffiliateTiers
method.
The UpdateAffiliateTiers
method is currently a stub. Consider implementing the logic for updating affiliate tiers.
Would you like assistance in implementing this method or opening a GitHub issue to track this task?
/** Response to MsgRegisterAffiliate */ | ||
|
||
export interface MsgRegisterAffiliateResponse {} |
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.
Use a type alias instead of an empty interface.
The MsgRegisterAffiliateResponse
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface MsgRegisterAffiliateResponse {}
+ export type MsgRegisterAffiliateResponse = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface MsgRegisterAffiliateResponse {} | |
export type MsgRegisterAffiliateResponse = {}; |
Tools
Biome
[error] 24-24: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
export interface MsgUpdateAffiliateTiersResponse {} | ||
/** Response to MsgUpdateAffiliateTiers */ | ||
|
||
export interface MsgUpdateAffiliateTiersResponseSDKType {} |
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.
Use a type alias instead of an empty interface.
The MsgUpdateAffiliateTiersResponseSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface MsgUpdateAffiliateTiersResponseSDKType {}
+ export type MsgUpdateAffiliateTiersResponseSDKType = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface MsgUpdateAffiliateTiersResponseSDKType {} | |
export type MsgUpdateAffiliateTiersResponseSDKType = {}; |
Tools
Biome
[error] 51-51: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
export interface MsgRegisterAffiliateResponse {} | ||
/** Response to MsgRegisterAffiliate */ | ||
|
||
export interface MsgRegisterAffiliateResponseSDKType {} |
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.
Use a type alias instead of an empty interface.
The MsgRegisterAffiliateResponseSDKType
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface MsgRegisterAffiliateResponseSDKType {}
+ export type MsgRegisterAffiliateResponseSDKType = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface MsgRegisterAffiliateResponseSDKType {} | |
export type MsgRegisterAffiliateResponseSDKType = {}; |
Tools
Biome
[error] 27-27: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
} | ||
/** Response to MsgUpdateAffiliateTiers */ | ||
|
||
export interface MsgUpdateAffiliateTiersResponse {} |
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.
Use a type alias instead of an empty interface.
The MsgUpdateAffiliateTiersResponse
interface is empty and could be replaced with a type alias for clarity and simplicity.
Use a type alias as follows:
- export interface MsgUpdateAffiliateTiersResponse {}
+ export type MsgUpdateAffiliateTiersResponse = {};
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
export interface MsgUpdateAffiliateTiersResponse {} | |
export type MsgUpdateAffiliateTiersResponse = {}; |
Tools
Biome
[error] 48-48: An empty interface is equivalent to {}.
Safe fix: Use a type alias instead.
(lint/suspicious/noEmptyInterface)
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- protocol/app/msgs/all_msgs.go (1 hunks)
- protocol/app/msgs/internal_msgs.go (2 hunks)
- protocol/app/msgs/internal_msgs_test.go (1 hunks)
- protocol/app/msgs/normal_msgs.go (2 hunks)
- protocol/app/msgs/normal_msgs_test.go (1 hunks)
- protocol/lib/ante/internal_msg.go (2 hunks)
- protocol/x/affiliates/keeper/msg_server.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- protocol/x/affiliates/keeper/msg_server.go
Additional comments not posted (8)
protocol/lib/ante/internal_msg.go (1)
18-18
: Integration ofaffiliates
module inIsInternalMsg
function approved.The addition of the
affiliates
module and the inclusion of*affiliates.MsgUpdateAffiliateTiers
in theIsInternalMsg
function correctly extends the internal message handling capabilities.Also applies to: 143-144
protocol/app/msgs/internal_msgs_test.go (1)
66-68
: Test cases for affiliate messages inTestInternalMsgSamples_Gov_Key
approved.The addition of test cases for
MsgUpdateAffiliateTiers
andMsgUpdateAffiliateTiersResponse
ensures that these messages are correctly recognized and handled as internal messages.protocol/app/msgs/normal_msgs_test.go (1)
121-123
: Test cases for affiliate registration messages inTestNormalMsgs_Key
approved.The addition of test cases for
MsgRegisterAffiliate
andMsgRegisterAffiliateResponse
ensures that these messages are correctly recognized and handled as normal messages.protocol/app/msgs/internal_msgs.go (2)
19-19
: Import statement for affiliates package added.The import statement for the
affiliates
package is correctly added, allowing the use of affiliate-related types.
111-112
: New message types for affiliates added to InternalMsgSamplesDydxCustom.The entries for
MsgUpdateAffiliateTiers
andMsgUpdateAffiliateTiersResponse
are correctly added to handle affiliate tier updates.protocol/app/msgs/normal_msgs.go (2)
20-20
: Import statement for affiliates package added.The import statement for the
affiliates
package is correctly added, allowing the use of affiliate-related types.
222-223
: New message types for affiliates added to NormalMsgsDydxCustom.The entries for
MsgRegisterAffiliate
andMsgRegisterAffiliateResponse
are correctly added to handle affiliate registration.protocol/app/msgs/all_msgs.go (1)
152-155
: New message types for affiliates added to AllTypeMessages.The entries for
MsgRegisterAffiliate
,MsgRegisterAffiliateResponse
,MsgUpdateAffiliateTiers
, andMsgUpdateAffiliateTiersResponse
are correctly added to handle affiliate operations.
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- protocol/x/affiliates/keeper/grpc_query.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- protocol/x/affiliates/keeper/grpc_query.go
string affiliate = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
// Block number at which the affiliate was registered. | ||
uint64 registered_at_block = 3; | ||
} |
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.
New line EOF
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
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- proto/dydxprotocol/indexer/events/events.proto (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- proto/dydxprotocol/indexer/events/events.proto
f844992
to
f7b8799
Compare
Changelist
Adds protos for affiliates which includes txs, queries and events
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
Refactor
dydxprotocol
namespace for better maintainability.