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

[cli] Refactor oracle and implement rooch oracle command #2714

Merged
merged 5 commits into from
Sep 30, 2024

Conversation

jolestar
Copy link
Contributor

@jolestar jolestar commented Sep 29, 2024

Summary

This PR refactors the oracle components and implements the rooch oracle command. Key changes include:

  1. [framework] Add entry function and event for the Oracle module.
  2. [gas_market] Trusted Oracle support adding new data source.
  3. [cli] Refactor oracle and implement rooch oracle command.
    • Support Oracle data aggregator.
rooch oracle reporter --oracle-id 0x368a3d8ebd5e41152459d8493f732ad8a45abbd184d15b22297e9b6a3bbc6724 --oracle-admin-id 0xbeefb15e84dc427d5e59e9295812407e4c880619b59d66e968fa06edb3bafbd3 --data-source okx --ticker btcusd --stop-after-report-times 100 --aggregate-strategy average --report-interval 1

2024-09-29T20:18:46.686433Z  INFO rooch_oracle::data_process: Connected to wss://ws.okx.com:8443/ws/v5/public
2024-09-29T20:18:47.804017Z  INFO rooch_oracle::data_process: Submit data success, value: 6595739999999, tx_hash: 0x541ea88f6773c136f9573d3deef7d3baeb7e46201b5b6573071d208bea5133eb, gas_used:431746
2024-09-29T20:18:48.621449Z  INFO rooch_oracle::data_process: Submit data success, value: 6595739999999, tx_hash: 0xea5e77657f3e1d1232514093c1f1a18247adf370774c747d14deb7bf88909cd5, gas_used:431746
2024-09-29T20:18:49.358233Z  INFO rooch_oracle::data_process: Submit data success, value: 6595739999999, tx_hash: 0xcdee75d809d2af66e01596a2ac547ebb46f03e8bdb925d109315c7a5461b2b0e, gas_used:431746
2024-09-29T20:18:50.342330Z  INFO rooch_oracle::data_process: Submit data success, value: 6595739999999, tx_hash: 0x080f96d48c5793bc9a28ca9462c2209c22a1e1261643599408c9b6ff80659d12, gas_used:431746
2024-09-29T20:18:51.114239Z  INFO rooch_oracle::data_process: Submit data success, value: 6595739999999, tx_hash: 0x78bc003296d4220b4c4daa9f773329894fdb451e52bacf9053b429a3f30b64d1, gas_used:431746

Copy link

vercel bot commented Sep 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rooch-portal-v2.1 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2024 8:28pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rooch ⬜️ Ignored (Inspect) Sep 29, 2024 8:28pm

Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
cargo/tokio-stream 0.1.16 🟢 8.3
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1030 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Security-Policy🟢 10security policy file detected
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Vulnerabilities🟢 100 existing vulnerabilities detected
Binary-Artifacts🟢 10no binaries found in the repo
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Fuzzing🟢 10project is fuzzed
SAST⚠️ 0SAST tool is not run on all commits -- score normalized to 0

Scanned Manifest Files

Cargo.lock

@jolestar jolestar merged commit 48ccca4 into main Sep 30, 2024
10 checks passed
@jolestar jolestar deleted the refactor_oracle branch September 30, 2024 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants