astraly-labs / pragma-node

Pragma API
https://docs.pragma.build/Resources/PragmApi/overview
MIT License
2 stars 1 forks source link

feat: websocket subscription to entries #49

Closed akhercha closed 3 months ago

akhercha commented 4 months ago

Resolves: #48 #61

Added

Changed


Starkex Documentation: https://docs.starkware.co/starkex/perpetual/becoming-an-oracle-provider-for-starkex.html

akhercha commented 3 months ago

@EvolveArt I updated to the most recent stable toolchain (cause of dependencies issues) - what was the reason for the nightly toolchain? I see we use the same toolchain in Madara, was that the reason?

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 8.72193% with 1057 lines in your changes missing coverage. Please review.

Project coverage is 14.02%. Comparing base (4a6ef2c) to head (b1ce10e). Report is 69 commits behind head on main.

:exclamation: Current head b1ce10e differs from pull request most recent head d30d796

Please upload reports for the commit d30d796 to get more accurate results.

Files Patch % Lines
...ma-node/src/handlers/entries/subscribe_to_entry.rs 0.00% 251 Missing :warning:
...ma-node/src/infra/repositories/entry_repository.rs 0.00% 186 Missing :warning:
pragma-ingestor/src/main.rs 0.00% 95 Missing :warning:
...a-node/src/handlers/entries/create_future_entry.rs 1.14% 86 Missing :warning:
pragma-entities/src/models/entries/perp_entry.rs 0.00% 79 Missing :warning:
pragma-node/src/handlers/entries/types.rs 42.51% 73 Missing :warning:
pragma-entities/src/models/entries/future_entry.rs 0.00% 72 Missing :warning:
pragma-node/src/handlers/entries/utils.rs 1.56% 63 Missing :warning:
pragma-node/src/utils/aws.rs 0.00% 27 Missing :warning:
pragma-entities/src/schema.rs 0.00% 24 Missing :warning:
... and 16 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #49 +/- ## =========================================== - Coverage 26.58% 14.02% -12.56% =========================================== Files 20 51 +31 Lines 1170 3985 +2815 =========================================== + Hits 311 559 +248 - Misses 859 3426 +2567 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

EvolveArt commented 3 months ago

@EvolveArt I updated to the most recent stable toolchain (cause of dependencies issues) - what was the reason for the nightly toolchain? I see we use the same toolchain in Madara, was that the reason?

No particular reasons, it's fine to update

akhercha commented 3 months ago

Don't merge yet - I'm having a wrong price when dividing the mark price by the spot price of a stablecoin. Checking this

EDIT: I just need to apply the decimals on the median stablecoin price before dividing - doing this asap

EDIT 2: Fixed - just need to remove some unwrap

EDIT 3: Done ✅