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

Function insert_quote

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

Source from the content-addressed store, hash-verified

413
414#[instrument(skip_all)]
415pub async fn insert_quote(ex: &mut PgConnection, quote: &Quote) -> Result<(), sqlx::Error> {
416 sqlx::query(INSERT_ORDER_QUOTES_QUERY)
417 .bind(quote.order_uid)
418 .bind(quote.gas_amount)
419 .bind(quote.gas_price)
420 .bind(quote.sell_token_price)
421 .bind(&quote.sell_amount)
422 .bind(&quote.buy_amount)
423 .bind(quote.solver)
424 .bind(quote.verified)
425 .bind(&quote.metadata)
426 .execute(ex)
427 .await?;
428 Ok(())
429}
430
431#[instrument(skip_all)]
432pub async fn read_quote(

Calls 2

queryFunction · 0.85
executeMethod · 0.45

Tested by

no test coverage detected