tycho_common/simulation/
indicatively_priced.rs1use std::collections::HashMap;
2
3use async_trait::async_trait;
4use num_bigint::BigUint;
5
6use crate::{
7 models::protocol::GetAmountOutParams,
8 simulation::{errors::SimulationError, protocol_sim::ProtocolSim},
9 Bytes,
10};
11
12pub struct SignedQuote {
13 pub base_token: Bytes,
14 pub quote_token: Bytes,
15 pub amount_in: BigUint,
16 pub amount_out: BigUint,
17 pub quote_attributes: HashMap<String, Bytes>,
19}
20
21#[async_trait]
22pub trait IndicativelyPriced: ProtocolSim {
23 fn is_indicatively_priced() -> bool {
25 false
26 }
27
28 async fn request_signed_quote(
30 &self,
31 _params: GetAmountOutParams,
32 ) -> Result<SignedQuote, SimulationError> {
33 Err(SimulationError::FatalError("request_signed_quote not implemented".into()))
34 }
35}