Skip to content

feat/tc-abacus-enhancements#630

Merged
ThomasRalee merged 1 commit intodevfrom
feat/tc-abacus-enhancements
Mar 26, 2026
Merged

feat/tc-abacus-enhancements#630
ThomasRalee merged 1 commit intodevfrom
feat/tc-abacus-enhancements

Conversation

@0xA1337
Copy link
Copy Markdown
Contributor

@0xA1337 0xA1337 commented Mar 26, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added current epoch data retrieval, including epoch end and accumulated points.
    • Enhanced account points response to include total referral points breakdown.
  • Tests

    • Added test coverage for current epoch data fetching.
  • Chores

    • Updated dependency version.

@0xA1337 0xA1337 requested a review from ThomasRalee March 26, 2026 04:44
@0xA1337 0xA1337 self-assigned this Mar 26, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e3698865-365d-4ec2-a626-192221cc5f3b

📥 Commits

Reviewing files that changed from the base of the PR and between b5e0b2c and 81f1967.

⛔ Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • protoV2/tcAbacus/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • packages/sdk-ts/package.json
  • packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.spec.ts
  • packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.ts
  • packages/sdk-ts/src/client/tcAbacus/grpc/transformers/index.ts
  • packages/sdk-ts/src/client/tcAbacus/types/tcAbacus.ts

📝 Walkthrough

Walkthrough

This PR introduces a new fetchCurrentEpoch() method to the TcAbacus gRPC client alongside corresponding type definitions, transformer logic, and test coverage. It also extends the AccountPointsResponse type with a totalReferralPoints field and updates a related dependency version.

Changes

Cohort / File(s) Summary
Dependency Update
packages/sdk-ts/package.json
Updated @injectivelabs/tc-abacus-proto-ts-v2 from version 1.18.1 to 1.18.2.
API Layer
packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.ts
Added new async fetchCurrentEpoch() method that constructs a gRPC request, executes the call via this.client.getCurrentEpoch, and returns the transformed response.
Data Transformers
packages/sdk-ts/src/client/tcAbacus/grpc/transformers/index.ts
Added new grpcCurrentEpochToCurrentEpoch() transformer to convert protobuf response to CurrentEpochResponse; updated grpcAccountPointsToAccountPoints() to include totalReferralPoints field.
Type Definitions
packages/sdk-ts/src/client/tcAbacus/types/tcAbacus.ts
Added new CurrentEpochResponse interface with epochEnd and epochPoints string fields; extended AccountPointsResponse interface with required totalReferralPoints: string field.
Test Coverage
packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.spec.ts
Added new test case fetchCurrentEpoch that verifies the method returns a defined response matching the expected transformed type structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A new epoch method hops into place,
With types aligned and transformers in grace,
Points referral tracked with care and delight,
The test suite ensures everything's right!
Proto-protégé stands tall and proud,
CodeRabbit cheers from the dev crowd! 🎉

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/tc-abacus-enhancements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedtsup@​8.5.1981009583100
Addedtypescript@​5.9.31001009010090

View full report

@ThomasRalee ThomasRalee merged commit d038a8a into dev Mar 26, 2026
4 of 5 checks passed
@ThomasRalee ThomasRalee deleted the feat/tc-abacus-enhancements branch March 26, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants