MCPcopy Create free account
hub / github.com/cowprotocol/services / insert_quote

Function insert_quote

crates/database/src/orders.rs:424–439  ·  view source on GitHub ↗
(ex: &mut PgConnection, quote: &Quote)

Source from the content-addressed store, hash-verified

422
423#[instrument(skip_all)]
424pub async fn insert_quote(ex: &mut PgConnection, quote: &Quote) -> Result<(), sqlx::Error> {
425 sqlx::query(INSERT_ORDER_QUOTES_QUERY)
426 .bind(quote.order_uid)
427 .bind(quote.gas_amount)
428 .bind(quote.gas_price)
429 .bind(quote.sell_token_price)
430 .bind(&quote.sell_amount)
431 .bind(&quote.buy_amount)
432 .bind(quote.solver)
433 .bind(quote.verified)
434 .bind(&quote.metadata)
435 .bind(quote.auction_id)
436 .execute(ex)
437 .await?;
438 Ok(())
439}
440
441#[instrument(skip_all)]
442pub async fn read_quote(

Calls 3

queryFunction · 0.85
bindMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected