pub struct CollectEvent {
pub dex: SharedDex,
pub pool_address: Address,
pub block_number: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub owner: Address,
pub recipient: Address,
pub tick_lower: i32,
pub tick_upper: i32,
pub amount0: u128,
pub amount1: u128,
}Expand description
Represents a collect event that occurs when fees are collected from a position in a liquidity pool.
Fields§
§dex: SharedDexThe decentralized exchange where the event happened.
pool_address: AddressThe address of the smart contract which emitted the event.
block_number: u64The block number when the collect occurred.
transaction_hash: StringThe unique hash identifier of the transaction containing this event.
transaction_index: u32The position of this transaction within the block.
log_index: u32The position of this event log within the transaction.
owner: AddressThe owner of the position.
recipient: AddressThe recipient of the collected fees.
tick_lower: i32The lower tick boundary of the position.
tick_upper: i32The upper tick boundary of the position.
amount0: u128The amount of token0 fees collected.
amount1: u128The amount of token1 fees collected.
Implementations§
Source§impl CollectEvent
impl CollectEvent
Sourcepub const fn new(
dex: SharedDex,
pool_address: Address,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
owner: Address,
recipient: Address,
tick_lower: i32,
tick_upper: i32,
amount0: u128,
amount1: u128,
) -> Self
pub const fn new( dex: SharedDex, pool_address: Address, block_number: u64, transaction_hash: String, transaction_index: u32, log_index: u32, owner: Address, recipient: Address, tick_lower: i32, tick_upper: i32, amount0: u128, amount1: u128, ) -> Self
Creates a new CollectEvent instance with the specified parameters.
Sourcepub fn to_pool_fee_collect(
&self,
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_address: Address,
timestamp: Option<UnixNanos>,
) -> PoolFeeCollect
pub fn to_pool_fee_collect( &self, chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_address: Address, timestamp: Option<UnixNanos>, ) -> PoolFeeCollect
Converts a collect event into a PoolFeeCollect.
Trait Implementations§
Source§impl Clone for CollectEvent
impl Clone for CollectEvent
Source§fn clone(&self) -> CollectEvent
fn clone(&self) -> CollectEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CollectEvent
impl RefUnwindSafe for CollectEvent
impl Send for CollectEvent
impl Sync for CollectEvent
impl Unpin for CollectEvent
impl UnwindSafe for CollectEvent
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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