-
Notifications
You must be signed in to change notification settings - Fork 15
feat: signed context oracle fetch module (Phase 3) #2458
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
Open
hardyjosh
wants to merge
14
commits into
feat/signed-context-oracle-discovery
Choose a base branch
from
feat/signed-context-oracle-fetch
base: feat/signed-context-oracle-discovery
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
f29d775
feat: add oracle fetch module and wire signed context into take-order…
7f98109
feat: wire oracle signed context into quote flow
1609cc1
fix: clippy lints and formatting
c1391fe
fix: conditionally apply reqwest timeout for non-WASM targets
f7e519b
feat: show oracle info on order detail page
f628b79
revert: remove frontend changes from Phase 3 PR
0275c3a
switch oracle fetch to POST with ABI-encoded body
026a106
oracle fetch: body is required, no GET fallback
aec3e74
wire ABI-encoded per-pair oracle fetches
63ea51f
refactor: move oracle into quote crate, remove closure pattern
2ac0d9b
fmt: cargo fmt fixes
d5f6698
feat: update oracle to batch format
96a257e
fix: cargo fmt formatting
3a0d44c
fix: cargo fmt import ordering in oracle.rs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| // Re-export oracle types and functions from the quote crate. | ||
| // This maintains backward compatibility for code in common that uses oracle functionality. | ||
| pub use rain_orderbook_quote::oracle::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -676,6 +676,7 @@ impl RaindexOrder { | |
| &rpc_urls, | ||
| Some(block_number), | ||
| sell_token, | ||
| self.oracle_url(), | ||
| ) | ||
| .await | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# First, let's find and examine the oracle module fd -t f oracle.rs crates/common/srcRepository: rainlanguage/rain.orderbook
Length of output: 98
🏁 Script executed:
# Check the main Cargo.toml for reqwest configuration cat crates/common/Cargo.tomlRepository: rainlanguage/rain.orderbook
Length of output: 2576
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 512
🏁 Script executed:
# Read the oracle.rs file to see what it uses cat -n crates/common/src/oracle.rsRepository: rainlanguage/rain.orderbook
Length of output: 4308
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 427
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 53
🏁 Script executed:
# Check the full lib.rs to see what's exported and how oracle fits cat -n crates/common/src/lib.rsRepository: rainlanguage/rain.orderbook
Length of output: 972
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 97
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 53
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 5667
🏁 Script executed:
# Check raindex_client to see if other non-guarded modules use wasm-incompatible features head -50 crates/common/src/raindex_client/mod.rsRepository: rainlanguage/rain.orderbook
Length of output: 1634
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 55
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 460
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 1272
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 242
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 526
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 91
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 53
🏁 Script executed:
Repository: rainlanguage/rain.orderbook
Length of output: 593
Add cfg guard to oracle module for WASM compatibility.
The
oraclemodule usesreqwest::Client::builder().timeout(...)(line 49–50 of oracle.rs), which is unavailable on WASM targets when reqwest is not built with thewasmfeature. Since the workspace reqwest has only thejsonfeature enabled, this code cannot compile for WASM. The module is publicly exported without guards and is called from WASM-exposed raindex_client functions. Add#[cfg(not(target_family = "wasm"))]to the oracle module declaration (line 10) to prevent this compilation failure, consistent with the pattern used forreplays(line 15–16).🤖 Prompt for AI Agents