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

Oracle Precompile #1445

Merged
merged 16 commits into from
Mar 26, 2024
Merged

Oracle Precompile #1445

merged 16 commits into from
Mar 26, 2024

Conversation

Kbhat1
Copy link
Contributor

@Kbhat1 Kbhat1 commented Mar 17, 2024

Describe your changes and provide context

  • Oracle precompile to query exchange rates + twaps
  • Oracle precompile integration tests

Testing performed to validate your change

  • Added integration tests, unit tests and verified on chain

precompiles/oracle/oracle.go Dismissed Show dismissed Hide dismissed
@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 68.05556% with 23 lines in your changes are missing coverage. Please review.

Project coverage is 62.02%. Comparing base (eb56128) to head (434e97a).
Report is 10 commits behind head on seiv2.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##            seiv2    #1445      +/-   ##
==========================================
- Coverage   62.87%   62.02%   -0.85%     
==========================================
  Files         350      353       +3     
  Lines       23965    24379     +414     
==========================================
+ Hits        15068    15122      +54     
- Misses       8029     8382     +353     
- Partials      868      875       +7     
Files Coverage Δ
app/app.go 64.08% <0.00%> (-0.56%) ⬇️
precompiles/oracle/oracle.go 69.01% <69.01%> (ø)

... and 5 files with indirect coverage changes

Copy link
Contributor

@stevenlanders stevenlanders left a comment

Choose a reason for hiding this comment

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

This looks super clean and the tests are great 💯 Small notes but nothing blocking.

precompiles/oracle/oracle.go Show resolved Hide resolved
precompiles/oracle/oracle.go Show resolved Hide resolved

for (let i = 0; i < exchangeRatesLen; i++) {
expect(exchangeRatesJSON[i].denom).to.equal(exchangeRates[i].denom);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we check that the other values in oracle_exchange_rate are reasonable values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jewei1997 yea, take a look at this comment above about this #1445 (comment)

Copy link
Contributor

@jewei1997 jewei1997 left a comment

Choose a reason for hiding this comment

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

overall LGTM, just left a few suggestions

@Kbhat1 Kbhat1 mentioned this pull request Mar 21, 2024
@Kbhat1 Kbhat1 enabled auto-merge (squash) March 26, 2024 19:29
@Kbhat1 Kbhat1 merged commit 1af3897 into seiv2 Mar 26, 2024
36 of 37 checks passed
@Kbhat1 Kbhat1 deleted the OraclePrecompile branch March 26, 2024 19:35
udpatil pushed a commit that referenced this pull request Mar 27, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 17, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 18, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
udpatil pushed a commit that referenced this pull request Apr 19, 2024
* Oracle Precompile

* Update abi oracle

* Update tests

* Update tests

* Update abi + tests

* integration test query

* Precompile integration tests

* Update type

* Add more loggign

* lint

* Add more checks

* update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants