pub struct SwapTx {Show 18 fields
pub pool: Pools,
pub direction: SwapDirection,
pub block_time: u64,
pub slot: u64,
pub index: u64,
pub atomic_instruction_index: u8,
pub fee_fraction_lp: u64,
pub swapped_amount_in: u64,
pub swapped_amount_received: u64,
pub pool_token_a_vault_amount: u64,
pub pool_token_b_vault_amount: u64,
pub price_a_b_lp: u128,
pub price_b_a_lp: u128,
pub token_a_address: Pubkey,
pub token_b_address: Pubkey,
pub market_address: Pubkey,
pub signature: Signature,
pub signers: HashSet<Pubkey>,
}Expand description
Standardized swap transaction type that is used to store all swap transactions on the blockchain
regardless of the protocol. This schema is used in solana_car historical ingestion and by
strategies and data analytics tools working in polars queries that we made.
Fields§
§pool: Pools§direction: SwapDirection§block_time: u64§slot: u64§index: u64§atomic_instruction_index: u8§fee_fraction_lp: u64§swapped_amount_in: u64§swapped_amount_received: u64§pool_token_a_vault_amount: u64§pool_token_b_vault_amount: u64§price_a_b_lp: u128§price_b_a_lp: u128§token_a_address: Pubkey§token_b_address: Pubkey§market_address: Pubkey§signature: Signature§signers: HashSet<Pubkey>Trait Implementations§
Auto Trait Implementations§
impl Freeze for SwapTx
impl RefUnwindSafe for SwapTx
impl Send for SwapTx
impl Sync for SwapTx
impl Unpin for SwapTx
impl UnwindSafe for SwapTx
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more