pub struct BurnEvent {
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 tick_lower: i32,
pub tick_upper: i32,
pub amount: u128,
pub amount0: U256,
pub amount1: U256,
}Expand description
Represents a burn event that occurs when liquidity is removed 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 burn 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.
tick_lower: i32The lower tick boundary of the position.
tick_upper: i32The upper tick boundary of the position.
amount: u128The amount of liquidity burned to the position range.
amount0: U256The amount of token0 withdrawn.
amount1: U256The amount of token1 withdrawn.
Implementations§
Source§impl BurnEvent
impl BurnEvent
Sourcepub fn new(
dex: SharedDex,
pool_identifier: PoolIdentifier,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
owner: Address,
tick_lower: i32,
tick_upper: i32,
amount: u128,
amount0: U256,
amount1: U256,
) -> Self
pub fn new( dex: SharedDex, pool_identifier: PoolIdentifier, block_number: u64, transaction_hash: String, transaction_index: u32, log_index: u32, owner: Address, tick_lower: i32, tick_upper: i32, amount: u128, amount0: U256, amount1: U256, ) -> Self
Creates a new BurnEvent instance with the specified parameters.
Sourcepub fn to_pool_liquidity_update(
&self,
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_identifier: PoolIdentifier,
timestamp: Option<UnixNanos>,
) -> PoolLiquidityUpdate
pub fn to_pool_liquidity_update( &self, chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_identifier: PoolIdentifier, timestamp: Option<UnixNanos>, ) -> PoolLiquidityUpdate
Converts a burn event into a PoolLiquidityUpdate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BurnEvent
impl RefUnwindSafe for BurnEvent
impl Send for BurnEvent
impl Sync for BurnEvent
impl Unpin for BurnEvent
impl UnwindSafe for BurnEvent
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