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

RPC for querying prices for all assets of given pool_id. #971

Merged
merged 15 commits into from
Jul 6, 2023
Merged

Conversation

vivekvpandya
Copy link
Contributor

Fixes #804

@vivekvpandya vivekvpandya added the s:review-needed The pull request requires reviews label Feb 13, 2023
@vivekvpandya vivekvpandya self-assigned this Feb 13, 2023
Copy link
Member

@maltekliemann maltekliemann left a comment

Choose a reason for hiding this comment

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

In addition to the comments made in the code, could you please ensure that the copyright notices are updated.

zrml/swaps/runtime-api/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
primitives/src/pool.rs Outdated Show resolved Hide resolved
runtime/common/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/runtime-api/src/lib.rs Outdated Show resolved Hide resolved
@maltekliemann maltekliemann added s:revision-needed The pull requests must be revised and removed s:review-needed The pull request requires reviews labels Feb 13, 2023
@vivekvpandya vivekvpandya added s:review-needed The pull request requires reviews and removed s:revision-needed The pull requests must be revised labels Feb 14, 2023
@codecov-commenter
Copy link

codecov-commenter commented Feb 14, 2023

Codecov Report

Merging #971 (5e67edd) into main (1f7ea61) will increase coverage by 0.00%.
The diff coverage is 90.47%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main     #971   +/-   ##
=======================================
  Coverage   94.39%   94.39%           
=======================================
  Files          93       93           
  Lines       21060    21138   +78     
=======================================
+ Hits        19880    19954   +74     
- Misses       1180     1184    +4     
Flag Coverage Δ
tests 94.39% <90.47%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
zrml/prediction-markets/src/mock.rs 78.83% <ø> (-0.16%) ⬇️
zrml/swaps/src/mock.rs 27.41% <0.00%> (-3.49%) ⬇️
zrml/swaps/src/tests.rs 99.93% <98.38%> (-0.04%) ⬇️
zrml/swaps/src/lib.rs 95.80% <100.00%> (+0.04%) ⬆️

... and 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@maltekliemann maltekliemann added s:in-progress The pull requests is currently being worked on and removed s:review-needed The pull request requires reviews labels Feb 16, 2023
@vivekvpandya vivekvpandya added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Feb 20, 2023
primitives/src/traits/swaps.rs Outdated Show resolved Hide resolved
runtime/common/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/src/lib.rs Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/runtime-api/src/lib.rs Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
zrml/swaps/rpc/src/lib.rs Outdated Show resolved Hide resolved
@maltekliemann maltekliemann requested review from maltekliemann and removed request for maltekliemann March 23, 2023 13:13
maltekliemann
maltekliemann previously approved these changes Mar 23, 2023
@maltekliemann maltekliemann added s:in-progress The pull requests is currently being worked on and removed s:review-needed The pull request requires reviews labels Jun 13, 2023
@maltekliemann maltekliemann added s:review-needed The pull request requires reviews and removed s:in-progress The pull requests is currently being worked on labels Jun 14, 2023
Copy link
Member

@sea212 sea212 left a comment

Choose a reason for hiding this comment

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

Tested using curl.

  • Works using single and multiple blocks
  • Provides correct results
  • Handles errors properly

@sea212 sea212 added s:accepted This pull request is ready for merge and removed s:review-needed The pull request requires reviews labels Jul 6, 2023
@sea212 sea212 added this to the v0.4.0 milestone Jul 6, 2023
@sea212 sea212 merged commit 31b7d64 into main Jul 6, 2023
11 checks passed
@sea212 sea212 deleted the issue-804 branch July 6, 2023 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:accepted This pull request is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rpc call to fetch historical asset prices for a pool over a range of blocks.
4 participants