Skip to content

feat: Add dex_getOrders endpoint and schema#546

Merged
RomanHodulak merged 1 commit intomainfrom
rh/tempo-orders-rpc
Oct 24, 2025
Merged

feat: Add dex_getOrders endpoint and schema#546
RomanHodulak merged 1 commit intomainfrom
rh/tempo-orders-rpc

Conversation

@RomanHodulak
Copy link
Copy Markdown
Contributor

Part of #536

Adds a trait, parameters and response type.

@RomanHodulak RomanHodulak requested review from klkvr and mattsse October 23, 2025 19:21
Comment thread crates/node/src/rpc/orders.rs Outdated
Comment thread crates/node/src/rpc/orders.rs Outdated
Comment thread crates/node/src/rpc/orders.rs Outdated
Comment thread crates/node/src/rpc/orders.rs Outdated
Comment thread crates/node/src/rpc/dex.rs Outdated
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Order {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we able to use the Order struct from the precompile crate directly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The RPC represents it differently and has features that wouldn't make sense for the precompile type (for example, why would the precompile representation be serializable to JSON?).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we could potentially unify those if we add serde support for this order type

@RomanHodulak
Copy link
Copy Markdown
Contributor Author

Thanks for your review @0xKitsune, I applied your suggestions.

For all the numeric types discrepancies, the spec called those are either a number or Hex. Is there a different spec?

Comment thread crates/node/src/rpc/dex.rs Outdated
Copy link
Copy Markdown
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

we also want some additional serde roundtrip test to ensure Optional fields behave as expected

Comment thread crates/node/src/rpc/dex.rs Outdated
Comment thread crates/node/src/rpc/dex.rs Outdated
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct Order {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we could potentially unify those if we add serde support for this order type

Comment thread crates/node/src/rpc/dex.rs Outdated
Copy link
Copy Markdown
Contributor

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

lgtm

naming suggestion

we can take a look at whether we can unify the order types separately

Comment thread crates/node/src/rpc/dex/mod.rs Outdated
@RomanHodulak RomanHodulak enabled auto-merge (squash) October 24, 2025 10:49
@RomanHodulak RomanHodulak merged commit d4ecaba into main Oct 24, 2025
10 checks passed
@RomanHodulak RomanHodulak deleted the rh/tempo-orders-rpc branch October 24, 2025 11:04
unbalancedparentheses pushed a commit to unbalancedparentheses/tempo that referenced this pull request Feb 23, 2026
Part of tempoxyz#536 

Adds a trait, parameters and response type.
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.

4 participants