pub struct MintEvent {Show 13 fields
pub dex: SharedDex,
pub pool_address: Address,
pub block_number: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub sender: Address,
pub owner: Address,
pub tick_lower: i32,
pub tick_upper: i32,
pub amount: u128,
pub amount0: U256,
pub amount1: U256,
}
Expand description
Represents a mint event that occurs when liquidity is added to a position in a liquidity pool.
Fields§
§dex: SharedDex
The decentralized exchange where the event happened.
pool_address: Address
The address of the smart contract which emitted the event.
block_number: u64
The block number when the mint occurred.
transaction_hash: String
The unique hash identifier of the transaction containing this event.
transaction_index: u32
The position of this transaction within the block.
log_index: u32
The position of this event log within the transaction.
sender: Address
The address that sent the transaction.
owner: Address
The owner of the position.
tick_lower: i32
The lower tick boundary of the position.
tick_upper: i32
The upper tick boundary of the position.
amount: u128
The amount of liquidity minted.
amount0: U256
The amount of token0 deposited.
amount1: U256
The amount of token1 deposited.
Implementations§
Source§impl MintEvent
impl MintEvent
Sourcepub const fn new(
dex: SharedDex,
pool_address: Address,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
sender: Address,
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, sender: Address, owner: Address, tick_lower: i32, tick_upper: i32, amount: u128, amount0: U256, amount1: U256, ) -> Self
Creates a new MintEvent
instance with the specified parameters.
Sourcepub fn to_pool_liquidity_update(
&self,
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_address: Address,
liquidity: Quantity,
amount0: Quantity,
amount1: Quantity,
timestamp: Option<UnixNanos>,
) -> PoolLiquidityUpdate
pub fn to_pool_liquidity_update( &self, chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_address: Address, liquidity: Quantity, amount0: Quantity, amount1: Quantity, timestamp: Option<UnixNanos>, ) -> PoolLiquidityUpdate
Converts a mint event into a PoolLiquidityUpdate
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MintEvent
impl RefUnwindSafe for MintEvent
impl Send for MintEvent
impl Sync for MintEvent
impl Unpin for MintEvent
impl UnwindSafe for MintEvent
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