-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: added view_receipt_record
rpc endpoint
#266
feat: added view_receipt_record
rpc endpoint
#266
Conversation
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.
Nice job indeed! I left a few change requests, but please wait for @kobayurii review before rushing on it. Thank!
Thanks for a review! I guess I need to pay more attention to delete all debug leftovers. I've fixed first two issues and I'll wait for @kobayurii review, before pushing changes. However, I still don't know if it's fine to return non Response type from RPC endpoint. Can someone tell me if it's a good practice: read-rpc/readnode-primitives/src/lib.rs Lines 180 to 181 in ac8f4f2
read-rpc/rpc-server/src/modules/receipts/methods.rs Lines 39 to 44 in ac8f4f2
|
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.
Thank you! Great job! I left a little comment. Also, I noticed that you created a pull request in the main branch. Please reopen the pull request for the develop branch. develop
is the main branch for development. Also don't forget to fix the checker.
While it's not perfect either, I would suggest following what @kobayurii did for the other custom method we have here https://github.com/near/read-rpc/blob/develop/rpc-server/src/modules/state/mod.rs I am not a fan of duplicating structures, but I would ask you to have the Feel free to implement My thoughts come from the idea of having dedicated structures for (again) request/response. Having Thank you for drawing my attention to this question 🙏 |
@frolvanya and please update https://github.com/near/read-rpc/blob/main/docs/CUSTOM_RPC_METHODS.md with info about the new method you've added. Thank you. |
ac8f4f2
to
88491b0
Compare
We need only |
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.
Perfect! Thank you 🙏
I've already changed the target branch to develop
as @kobayurii requested
* fix(near-state-indexer): Fix the TypeError in communication with Redis leading to spam of warnings (#254) * (rpc_server): metrics refactoring and improvements (#255) * merics reffactoring and imrovements * metrics improvements according pr comments * improvement tracing instrument logs (#257) * (database): Implement metrics to count requests for each table (#259) * Implement metrics to count request for each database table * remove logic to fetch all state before contract call * add issue to implement metrics for postgres * rename mentric DATABASE_QUERIES to DATABASE_READ_QUERIES * refactor(rpc-server): Tweaks and clean up around query.call_function method implementation (#258) * refactor(rpc-server): Tweaks and clean up around query.call_function method implementation * Follow the clippy suggestion * Drop redundant pieces of code * fix tx different results (#261) * Metrics(rpc-server): Extend metrics (#263) * extend metrics to collect block category * fmt * code improvement according git comments * Revert "fix tx different results" (#265) This reverts commit 2e4dc30. * feat: added `view_receipt_record` rpc endpoint (#266) * feat: added `view_receipt_record` rpc endpoint * chore: removed leftovers * feat: used appropriate metrics * feat: added proper response structure * docs(view_receipt_record): added new custom method * hook for poolv1.near (#267) * chore: relese v0.2.9 (#268) * proxy next_light_client_block to regular rpc (#269) * fix changelog.md (#270) --------- Co-authored-by: Bohdan Khorolets <[email protected]> Co-authored-by: Ivan Frolov <[email protected]>
Here's an example of calling
view_receipt_record
:closes #264