use serde::Deserialize;
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PayoutStats {
pub total_paid_wei: String,
pub rounds_settled: i64,
pub unique_recipients: i64,
pub largest_payout_wei: String,
#[serde(default)]
pub last_round_at: Option<i64>,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Pot {
#[serde(default)]
pub pot_bnb: Option<f64>,
pub distribute_bps: f64,
pub round_end: i64,
#[serde(default)]
pub total_points: Option<f64>,
pub points_per_usd: f64,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ShareEntry {
pub address: String,
pub points: f64,
pub share: i64,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Shares {
pub from: i64,
pub to: i64,
pub total_points: f64,
pub holders: Vec<ShareEntry>,
pub packed: String,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RoundReceipt {
pub round_id: i64,
pub time_start: i64,
pub time_end: i64,
#[serde(default)]
pub tx_hash: Option<String>,
#[serde(default)]
pub pot_wei: Option<String>,
#[serde(default)]
pub distributed_wei: Option<String>,
#[serde(default)]
pub winner_address: Option<String>,
#[serde(default)]
pub winner_amount_wei: Option<String>,
#[serde(default)]
pub holder_count: Option<i32>,
#[serde(default)]
pub vrf_random: Option<String>,
#[serde(default)]
pub distributed_at: Option<i64>,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct PayoutLine {
pub round_id: i64,
pub address: String,
pub share: i64,
pub amount_wei: String,
#[serde(default)]
pub username: Option<String>,
#[serde(default)]
pub avatar: Option<String>,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RoundDetail {
#[serde(flatten)]
pub round: RoundReceipt,
pub payouts: Vec<PayoutLine>,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AddressPayouts {
pub address: String,
pub total_wei: String,
pub rounds_paid: i64,
pub payouts: Vec<PayoutLine>,
}
#[derive(Debug, Clone, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Claimable {
pub address: String,
#[serde(default)]
pub claimable_wei: Option<String>,
#[serde(default)]
pub distributor_address: Option<String>,
}