pub struct FeeProtocolUpdateEvent {
pub dex: SharedDex,
pub pool_identifier: PoolIdentifier,
pub block_number: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub fee_protocol0_new: u8,
pub fee_protocol1_new: u8,
}Expand description
Represents a SetFeeProtocol event that changes a pool’s protocol-fee configuration.
Only the new per-token denominators are retained; the previous values carried by the event are not needed to rebuild pool state.
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.
fee_protocol0_new: u8The new protocol-fee denominator for token0.
fee_protocol1_new: u8The new protocol-fee denominator for token1.
Implementations§
Source§impl FeeProtocolUpdateEvent
impl FeeProtocolUpdateEvent
Sourcepub fn new(
dex: SharedDex,
pool_identifier: PoolIdentifier,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
fee_protocol0_new: u8,
fee_protocol1_new: u8,
) -> Self
pub fn new( dex: SharedDex, pool_identifier: PoolIdentifier, block_number: u64, transaction_hash: String, transaction_index: u32, log_index: u32, fee_protocol0_new: u8, fee_protocol1_new: u8, ) -> Self
Creates a new FeeProtocolUpdateEvent instance with the specified parameters.
Sourcepub fn to_pool_fee_protocol_update(
&self,
chain: SharedChain,
instrument_id: InstrumentId,
timestamp: UnixNanos,
) -> PoolFeeProtocolUpdate
pub fn to_pool_fee_protocol_update( &self, chain: SharedChain, instrument_id: InstrumentId, timestamp: UnixNanos, ) -> PoolFeeProtocolUpdate
Converts a fee-protocol update event into a PoolFeeProtocolUpdate.
Trait Implementations§
Source§impl Clone for FeeProtocolUpdateEvent
impl Clone for FeeProtocolUpdateEvent
Source§fn clone(&self) -> FeeProtocolUpdateEvent
fn clone(&self) -> FeeProtocolUpdateEvent
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 FeeProtocolUpdateEvent
impl RefUnwindSafe for FeeProtocolUpdateEvent
impl Send for FeeProtocolUpdateEvent
impl Sync for FeeProtocolUpdateEvent
impl Unpin for FeeProtocolUpdateEvent
impl UnsafeUnpin for FeeProtocolUpdateEvent
impl UnwindSafe for FeeProtocolUpdateEvent
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