pub struct BurnEvent {
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 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_address: AddressThe address of the smart contract which emitted the event.
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 const fn new(
dex: SharedDex,
pool_address: Address,
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 const fn new( dex: SharedDex, pool_address: Address, 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_address: Address,
timestamp: Option<UnixNanos>,
) -> PoolLiquidityUpdate
pub fn to_pool_liquidity_update( &self, chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_address: Address, 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§
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