-
Notifications
You must be signed in to change notification settings - Fork 183
Add onchain gas cost to trades and orders APIs #4540
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
base: main
Are you sure you want to change the base?
Changes from 10 commits
7bfa6fb
8e6bae8
3e73007
7b8ec28
c5c4ff2
ccc7a13
8b17b89
3688374
5d0197d
b1fa57e
9881ff2
70a833c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,6 +48,7 @@ pub async fn get_by_id( | |
| const QUERY: &str = const_format::concatcp!( | ||
| "SELECT ", | ||
| SELECT, | ||
| crate::trades::ORDER_GAS_COST_COLUMN, | ||
| " FROM ", FROM, | ||
| " WHERE o.uid = $1 ", | ||
| ); | ||
|
|
@@ -59,8 +60,14 @@ pub async fn get_many_by_uid<'a>( | |
| ex: &'a mut PgConnection, | ||
| order_uids: &'a [OrderUid], | ||
| ) -> Result<Vec<orders::FullOrder>, sqlx::Error> { | ||
| const QUERY: &str = | ||
| const_format::concatcp!("SELECT ", SELECT, " FROM ", FROM, " WHERE o.uid = ANY($1)"); | ||
| const QUERY: &str = const_format::concatcp!( | ||
| "SELECT ", | ||
| SELECT, | ||
| crate::trades::ORDER_GAS_COST_COLUMN, | ||
| " FROM ", | ||
| FROM, | ||
| " WHERE o.uid = ANY($1)" | ||
| ); | ||
| sqlx::query_as(QUERY).bind(order_uids).fetch_all(ex).await | ||
| } | ||
|
|
||
|
|
@@ -73,6 +80,7 @@ pub async fn get_by_tx( | |
| orders::SETTLEMENT_LOG_INDICES, | ||
| "SELECT ", | ||
| SELECT, | ||
| crate::trades::ORDER_GAS_COST_COLUMN, | ||
| " FROM ", | ||
| FROM, | ||
| " JOIN trades t ON t.order_uid = o.uid", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth double-checking the semantics here: |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.