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
12#[derive(Debug)]
13pub struct SignedQuote {
14 pub base_token: Bytes,
15 pub quote_token: Bytes,
16 pub amount_in: BigUint,
17 pub amount_out: BigUint,
18 pub quote_attributes: HashMap<String, Bytes>,
20}
21
22#[async_trait]
23pub trait IndicativelyPriced: ProtocolSim {
24 async fn request_signed_quote(
25 &self,
26 _params: GetAmountOutParams,
27 ) -> Result<SignedQuote, SimulationError> {
28 Err(SimulationError::FatalError("request_signed_quote not implemented".into()))
29 }
30}