Struct PoolLiquidityUpdate

Source
pub struct PoolLiquidityUpdate {
Show 17 fields pub chain: SharedChain, pub dex: SharedDex, pub pool: SharedPool, pub kind: PoolLiquidityUpdateType, pub block: u64, pub transaction_hash: String, pub transaction_index: u32, pub log_index: u32, pub sender: Option<Address>, pub owner: Address, pub position_liquidity: Quantity, pub amount0: Quantity, pub amount1: Quantity, pub tick_lower: i32, pub tick_upper: i32, pub timestamp: UnixNanos, pub ts_init: UnixNanos,
}
Expand description

Represents a liquidity update event in a decentralized exchange (DEX) pool.

Fields§

§chain: SharedChain

The blockchain network where the liquidity update occurred.

§dex: SharedDex

The decentralized exchange where the liquidity update was executed.

§pool: SharedPool

The DEX liquidity pool

§kind: PoolLiquidityUpdateType

The type of the pool liquidity update.

§block: u64

The blockchain block number where the liquidity update occurred.

§transaction_hash: String

The unique hash identifier of the blockchain transaction containing the liquidity update.

§transaction_index: u32

The index position of the transaction within the block.

§log_index: u32

The index position of the liquidity update event log within the transaction.

§sender: Option<Address>

The blockchain address that initiated the liquidity update transaction.

§owner: Address

The blockchain address that owns the liquidity position.

§position_liquidity: Quantity

The amount of liquidity tokens affected in the position.

§amount0: Quantity

The amount of the first token in the pool pair.

§amount1: Quantity

The amount of the second token in the pool pair.

§tick_lower: i32

The lower price tick boundary of the liquidity position.

§tick_upper: i32

The upper price tick boundary of the liquidity position.

§timestamp: UnixNanos

The timestamp of the liquidity update in Unix nanoseconds.

§ts_init: UnixNanos

UNIX timestamp (nanoseconds) when the instance was created.

Implementations§

Source§

impl PoolLiquidityUpdate

Source

pub const fn new( chain: SharedChain, dex: SharedDex, pool: SharedPool, kind: PoolLiquidityUpdateType, block: u64, transaction_hash: String, transaction_index: u32, log_index: u32, sender: Option<Address>, owner: Address, position_liquidity: Quantity, amount0: Quantity, amount1: Quantity, tick_lower: i32, tick_upper: i32, timestamp: UnixNanos, ) -> Self

Creates a new PoolLiquidityUpdate instance with the specified properties.

Source

pub fn instrument_id(&self) -> InstrumentId

Returns the instrument ID for this liquidity update.

Trait Implementations§

Source§

impl Clone for PoolLiquidityUpdate

Source§

fn clone(&self) -> PoolLiquidityUpdate

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PoolLiquidityUpdate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for PoolLiquidityUpdate

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for PoolLiquidityUpdate

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<PoolLiquidityUpdate> for DefiData

Source§

fn from(value: PoolLiquidityUpdate) -> Self

Converts to this type from the input type.
Source§

impl HasTsInit for PoolLiquidityUpdate

Source§

fn ts_init(&self) -> UnixNanos

Returns the UNIX timestamp (nanoseconds) when the instance was created.
Source§

impl PartialEq for PoolLiquidityUpdate

Source§

fn eq(&self, other: &PoolLiquidityUpdate) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

const fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for PoolLiquidityUpdate

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PoolLiquidityUpdate

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Separable for T
where T: Display,

Source§

fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String

Adds separators according to the given SeparatorPolicy. Read more
Source§

fn separate_with_commas(&self) -> String

Inserts a comma every three digits from the right. Read more
Source§

fn separate_with_spaces(&self) -> String

Inserts a space every three digits from the right. Read more
Source§

fn separate_with_dots(&self) -> String

Inserts a period every three digits from the right. Read more
Source§

fn separate_with_underscores(&self) -> String

Inserts an underscore every three digits from the right. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Ungil for T
where T: Send,