pub struct FeeProtocolCollectEvent {
pub dex: SharedDex,
pub pool_identifier: PoolIdentifier,
pub block_number: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub sender: Address,
pub recipient: Address,
pub amount0: u128,
pub amount1: u128,
}Expand description
Represents a CollectProtocol event that withdraws accrued protocol fees from a pool.
This is the owner-only protocol-fee withdrawal, distinct from the regular Collect event that
withdraws an LP position’s fees. The withdrawn amounts decrement the pool’s protocol-fee balances.
Fields§
§dex: SharedDexThe decentralized exchange where the event happened.
pool_identifier: PoolIdentifierThe unique identifier for the pool.
block_number: u64The block number in which this event was included.
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.
sender: AddressThe address that initiated the withdrawal (the factory owner).
recipient: AddressThe address that received the withdrawn protocol fees.
amount0: u128The amount of token0 protocol fees withdrawn.
amount1: u128The amount of token1 protocol fees withdrawn.
Implementations§
Source§impl FeeProtocolCollectEvent
impl FeeProtocolCollectEvent
Sourcepub fn new(
dex: SharedDex,
pool_identifier: PoolIdentifier,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
sender: Address,
recipient: Address,
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, sender: Address, recipient: Address, amount0: u128, amount1: u128, ) -> Self
Creates a new FeeProtocolCollectEvent instance with the specified parameters.
Sourcepub fn to_pool_fee_protocol_collect(
&self,
chain: SharedChain,
instrument_id: InstrumentId,
timestamp: UnixNanos,
) -> PoolFeeProtocolCollect
pub fn to_pool_fee_protocol_collect( &self, chain: SharedChain, instrument_id: InstrumentId, timestamp: UnixNanos, ) -> PoolFeeProtocolCollect
Converts a collect-protocol event into a PoolFeeProtocolCollect.
Trait Implementations§
Source§impl Clone for FeeProtocolCollectEvent
impl Clone for FeeProtocolCollectEvent
Source§fn clone(&self) -> FeeProtocolCollectEvent
fn clone(&self) -> FeeProtocolCollectEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for FeeProtocolCollectEvent
impl RefUnwindSafe for FeeProtocolCollectEvent
impl Send for FeeProtocolCollectEvent
impl Sync for FeeProtocolCollectEvent
impl Unpin for FeeProtocolCollectEvent
impl UnsafeUnpin for FeeProtocolCollectEvent
impl UnwindSafe for FeeProtocolCollectEvent
Blanket Implementations§
impl<T> Allocation for T
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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