pub struct PoolFeeProtocolUpdate {
pub chain: SharedChain,
pub dex: SharedDex,
pub instrument_id: InstrumentId,
pub pool_identifier: PoolIdentifier,
pub block: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub fee_protocol0_new: u32,
pub fee_protocol1_new: u32,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Represents a protocol-fee configuration change in a Uniswap V3-style pool.
Emitted by SetFeeProtocol, this carries the new protocol-fee values for each token. Uniswap
V3 uses 4-bit denominators, while PancakeSwap V3 uses uint32 basis-point shares. Only the new
values are kept; the previous values in the event are not needed to rebuild state.
Fields§
§chain: SharedChainThe blockchain network where the protocol-fee change occurred.
dex: SharedDexThe decentralized exchange where the protocol-fee change occurred.
instrument_id: InstrumentIdThe instrument ID for this pool’s trading pair.
pool_identifier: PoolIdentifierThe unique identifier for this pool (could be an address or other protocol-specific hex string).
block: u64The blockchain block number where the protocol-fee change occurred.
transaction_hash: StringThe unique hash identifier of the blockchain transaction containing the protocol-fee change.
transaction_index: u32The index position of the transaction within the block.
log_index: u32The index position of the protocol-fee change event log within the transaction.
fee_protocol0_new: u32The new token0 protocol-fee value.
fee_protocol1_new: u32The new token1 protocol-fee value.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the protocol-fee change event occurred.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl PoolFeeProtocolUpdate
impl PoolFeeProtocolUpdate
Sourcepub const fn new(
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_identifier: PoolIdentifier,
block: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
fee_protocol0_new: u32,
fee_protocol1_new: u32,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub const fn new( chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_identifier: PoolIdentifier, block: u64, transaction_hash: String, transaction_index: u32, log_index: u32, fee_protocol0_new: u32, fee_protocol1_new: u32, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Creates a new PoolFeeProtocolUpdate instance with the specified properties.
Sourcepub fn uniswap_v3_packed(&self) -> Option<u8>
pub fn uniswap_v3_packed(&self) -> Option<u8>
Returns the new Uniswap V3 protocol-fee setting packed into a single byte.
The token0 denominator occupies the lower four bits and token1 the upper four bits. Returns
None when either value does not fit the Uniswap V3 nibble layout.
Trait Implementations§
Source§impl Clone for PoolFeeProtocolUpdate
impl Clone for PoolFeeProtocolUpdate
Source§fn clone(&self) -> PoolFeeProtocolUpdate
fn clone(&self) -> PoolFeeProtocolUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more