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

Function insert_quote

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

Source from the content-addressed store, hash-verified

464
465#[instrument(skip_all)]
466pub async fn insert_quote(ex: &mut PgConnection, quote: &Quote) -> Result<(), sqlx::Error> {
467 sqlx::query(INSERT_ORDER_QUOTES_QUERY)
468 .bind(quote.order_uid)
469 .bind(quote.gas_amount)
470 .bind(quote.gas_price)
471 .bind(quote.sell_token_price)
472 .bind(&quote.sell_amount)
473 .bind(&quote.buy_amount)
474 .bind(quote.solver)
475 .bind(quote.verified)
476 .bind(&quote.metadata)
477 .bind(quote.quote_id)
478 .execute(ex)
479 .await?;
480 Ok(())
481}
482
483#[instrument(skip_all)]
484pub async fn read_quote(

Calls 3

queryFunction · 0.50
executeMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected