pub struct CollectEvent {
pub dex: SharedDex,
pub pool_identifier: PoolIdentifier,
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_identifier: PoolIdentifierThe unique identifier for the pool.
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 fn new(
dex: SharedDex,
pool_identifier: PoolIdentifier,
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 fn new( dex: SharedDex, pool_identifier: PoolIdentifier, 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,
timestamp: Option<UnixNanos>,
) -> PoolFeeCollect
pub fn to_pool_fee_collect( &self, chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, 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
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§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>
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