abstract icon indicating copy to clipboard operation
abstract copied to clipboard

Oracle Adapter

Open Kayanski opened this issue 1 year ago • 3 comments

Adding the Oracle Adapter to abstract supported adapters

Added Pyth implementation and tests

Based on https://www.notion.so/abstract-money/Price-Oracle-24cb3a64c535427d9a38b0312235f889

Checklist

  • [ ] CI is green.
  • [ ] Changelog updated.

Kayanski avatar Nov 25 '24 10:11 Kayanski

Deploying abstract-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5b2e031
Status: ✅  Deploy successful!
Preview URL: https://3d393b26.abstract-docs.pages.dev
Branch Preview URL: https://nicolas-abs-589-oracle-adapt.abstract-docs.pages.dev

View logs

Codecov Report

Attention: Patch coverage is 0% with 213 lines in your changes missing coverage. Please review.

Project coverage is 65.2%. Comparing base (bf989a9) to head (7ab80c9). Report is 73 commits behind head on main.

Files with missing lines Patch % Lines
integrations/oracles/pyth/src/lib.rs 0.0% 54 Missing :warning:
modules/contracts/adapters/oracle/src/lib.rs 0.0% 48 Missing :warning:
...les/contracts/adapters/oracle/src/oracle_tester.rs 0.0% 42 Missing :warning:
modules/contracts/adapters/oracle/src/api.rs 0.0% 26 Missing :warning:
...es/contracts/adapters/oracle/src/handlers/query.rs 0.0% 16 Missing :warning:
...tracts/adapters/oracle/src/handlers/instantiate.rs 0.0% 9 Missing :warning:
.../contracts/adapters/oracle/src/handlers/execute.rs 0.0% 8 Missing :warning:
...dules/contracts/adapters/oracle/src/oracles/mod.rs 0.0% 6 Missing :warning:
framework/packages/standards/oracle/src/msg.rs 0.0% 4 Missing :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
framework/packages/standards/oracle/src/msg.rs 0.0% <0.0%> (ø)
...dules/contracts/adapters/oracle/src/oracles/mod.rs 0.0% <0.0%> (ø)
.../contracts/adapters/oracle/src/handlers/execute.rs 0.0% <0.0%> (ø)
...tracts/adapters/oracle/src/handlers/instantiate.rs 0.0% <0.0%> (ø)
...es/contracts/adapters/oracle/src/handlers/query.rs 0.0% <0.0%> (ø)
modules/contracts/adapters/oracle/src/api.rs 0.0% <0.0%> (ø)
...les/contracts/adapters/oracle/src/oracle_tester.rs 0.0% <0.0%> (ø)
modules/contracts/adapters/oracle/src/lib.rs 0.0% <0.0%> (ø)
integrations/oracles/pyth/src/lib.rs 0.0% <0.0%> (ø)

... and 169 files with indirect coverage changes

codecov[bot] avatar Nov 26 '24 13:11 codecov[bot]

The PR specifies that the implementation was performed with the API specified in the Oracle adapter design.

However, it seems that asset registration and value queries were not implemented. Are those supposed to be implemented on this adapter or elsewhere?

To me, asset registration and value queries should not be placed inside the oracle adapter which is there to query prices from price sources using keys (for the moment). It belongs in a value computation app for instance, because it contains account specific storage that is best handled within an App

Kayanski avatar Nov 27 '24 08:11 Kayanski