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

view service: add LatestSwaps #5008

Merged
merged 2 commits into from
Jan 28, 2025
Merged

view service: add LatestSwaps #5008

merged 2 commits into from
Jan 28, 2025

Conversation

TalDerei
Copy link
Collaborator

@TalDerei TalDerei commented Jan 28, 2025

Describe your changes

extends ViewService by adding a new LatestSwaps method, enabling clients to query recent swap activity.

precursor to penumbra-zone/web#2005

Issue ticket number and link

references penumbra-zone/dex-explorer#320

Checklist before requesting a review

  • I have added guiding text to explain how a reviewer should test these changes.

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

@erwanor erwanor merged commit 0d8fa13 into main Jan 28, 2025
15 checks passed
@erwanor erwanor deleted the latest-swaps-request branch January 28, 2025 10:49
&self,
_request: tonic::Request<pb::LatestSwapsRequest>,
) -> Result<tonic::Response<Self::LatestSwapsStream>, tonic::Status> {
unimplemented!("latest_swaps currently only implemented on web")

Choose a reason for hiding this comment

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

question: why is it so? I see many methods here are not implemented, is it deliberate?

Copy link
Collaborator Author

@TalDerei TalDerei Jan 29, 2025

Choose a reason for hiding this comment

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

question: why is it so? I see many methods here are not implemented, is it deliberate?

we define the rpc service method in view.proto, but we stub the service as unimplemented to ensure the rust build compiles, otherwise it'll complain. In this context, it means that the LatestSwaps view service method is not supported functionality in pcli, but is available in prax (which supports it's own view service implementations).

happy to pair at some point to walk how protobuf + domain type generation + rpc services work in the monorepo.

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.

3 participants