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

Rename TradingRewardEventV1 name and denom field #869

Merged
merged 2 commits into from
Dec 8, 2023
Merged

Conversation

Christopher-Li
Copy link
Contributor

@Christopher-Li Christopher-Li commented Dec 8, 2023

Changelist

Rename TradingRewardEventV1 name and denom field

Test Plan

Field is not used, no tests

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If the PR has breaking postgres changes to the indexer add the indexer-postgres-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Copy link
Contributor

coderabbitai bot commented Dec 8, 2023

Walkthrough

The recent updates involve renaming entities and fields in TypeScript interfaces and protocol buffer definitions related to trading rewards. The term TradingRewardEventV1 has been changed to TradingRewardsEventV1 to likely reflect multiple rewards, and the property denoms has been updated to denomAmount or denom_amount to clarify that it represents amounts of denominations.

Changes

File Path Change Summary
.../v4-protos/src/codegen/.../events/events.ts Renamed TradingRewardEventV1 to TradingRewardsEventV1 and denoms to denomAmount; updated associated functions.
.../indexer/events/events.proto Renamed TradingRewardEventV1 to TradingRewardsEventV1 and field denoms to denom_amount.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between e696ea6 and 252800f.
Files ignored due to filter (1)
  • protocol/indexer/events/events.pb.go
Files selected for processing (2)
  • indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (9 hunks)
  • proto/dydxprotocol/indexer/events/events.proto (2 hunks)
Files skipped from review due to trivial changes (1)
  • proto/dydxprotocol/indexer/events/events.proto
Additional comments: 8
indexer/packages/v4-protos/src/codegen/dydxprotocol/indexer/events/events.ts (8)
  • 1134-1141: The changes from lines 1134 to 1141 correctly reflect the renaming of the TradingRewardEventV1 interface to TradingRewardsEventV1 as per the PR objectives and summary.

  • 1157-1164: The changes from lines 1157 to 1164 correctly reflect the renaming of the denoms field to denomAmount within the AddressTradingReward interface, aligning with the PR objectives and summary.

  • 1172-1179: The changes from lines 1172 to 1179 correctly reflect the renaming of the denoms field to denom_amount within the AddressTradingRewardSDKType interface, which is consistent with the renaming pattern applied to the non-SDK type interface.

  • 2902-2915: The changes from lines 2902 to 2915 introduce the TradingRewardsEventV1 interface, which is consistent with the renaming pattern and the PR objectives. The tradingRewards field is correctly typed as an array of AddressTradingReward.

  • 2947-2952: The changes from lines 2947 to 2952 introduce the AddressTradingReward interface with the owner and denomAmount fields, which aligns with the renaming of the denoms field to denomAmount as per the PR objectives.

  • 2957-2964: The changes from lines 2957 to 2964 correctly implement the encode method for the AddressTradingReward interface, ensuring the owner and denomAmount fields are encoded when they are not default values.

  • 2978-2984: The changes from lines 2978 to 2984 correctly implement the decode method for the AddressTradingReward interface, ensuring the owner and denomAmount fields are decoded from the input.

  • 2993-2998: The changes from lines 2993 to 2998 correctly implement the fromPartial method for the AddressTradingReward interface, which is used to create a partial instance of the interface from an object.

@roy-dydx roy-dydx merged commit 4b3b08e into main Dec 8, 2023
30 of 32 checks passed
@roy-dydx roy-dydx deleted the cl_update_proto branch December 8, 2023 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants