//! This code was AUTOGENERATED using the Codama library.
use solana_pubkey::Pubkey;
/// Emitted by when a swap is performed for a pool
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct SwapEvent {
    /// The pool for which token_0 and token_1 were swapped
    pub pool_state: Pubkey,
    /// The address that initiated the swap call, and that received the callback
    pub sender: Pubkey,
    /// The payer token account in zero for one swaps, or the recipient token
    /// account in one for zero swaps
    pub token_account0: Pubkey,
    /// The payer token account in one for zero swaps, or the recipient token
    /// account in zero for one swaps
    pub token_account1: Pubkey,
    /// The real delta amount of the token_0 of the pool or user
    pub amount0: u64,
    /// The transfer fee charged by the withheld_amount of the token_0
    pub transfer_fee0: u64,
    /// The real delta of the token_1 of the pool or user
    pub amount1: u64,
    /// The transfer fee charged by the withheld_amount of the token_1
    pub transfer_fee1: u64,
    /// if true, amount_0 is negtive and amount_1 is positive
    pub zero_for_one: bool,
    /// The sqrt(price) of the pool after the swap, as a Q64.64
    pub sqrt_price_x64: u128,
    /// The liquidity of the pool after the swap
    pub liquidity: u128,
    /// The log base 1.0001 of price of the pool after the swap
    pub tick: i32,
}
