kabu_rpc_handler/dto/
quote.rs1use crate::dto::pool::PoolProtocol;
2use alloy_primitives::{Address, U256};
3use serde::{Deserialize, Serialize};
4use utoipa::PartialSchema;
5use utoipa::{IntoParams, ToSchema};
6
7#[derive(Debug, Deserialize, IntoParams)]
8pub struct Filter {
9 pub protocol: Option<PoolProtocol>,
10}
11
12#[allow(unused)]
13#[derive(Debug, Deserialize, ToSchema)]
14pub struct QuoteRequest {
15 #[schema(schema_with = String::schema)]
16 pub token_address_from: Address,
17 #[schema(schema_with = String::schema)]
18 pub token_address_to: Address,
19 #[schema(schema_with = String::schema)]
20 pub amount_in: U256,
21}
22
23#[derive(Debug, Serialize, ToSchema)]
24pub struct QuoteResponse {
25 #[schema(schema_with = String::schema)]
26 pub out_amount: U256,
27 pub gas_used: u64,
28}