pub struct PoolFlash {Show 16 fields
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 ts_event: UnixNanos,
pub sender: Address,
pub recipient: Address,
pub amount0: U256,
pub amount1: U256,
pub paid0: U256,
pub paid1: U256,
pub ts_init: UnixNanos,
}Expand description
Represents a flash loan event from a Uniswap V3 pool.
Flash loans allow users to borrow tokens without collateral as long as they are returned within the same transaction. Fees are paid on the borrowed amount, which are added to the pool’s fee growth accumulators.
Fields§
§chain: SharedChainThe blockchain network where the flash loan occurred.
dex: SharedDexThe decentralized exchange where the flash loan was executed.
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 at which the flash loan was executed.
transaction_hash: StringThe unique hash identifier of the blockchain transaction containing the flash loan.
transaction_index: u32The index position of the transaction within the block.
log_index: u32The index position of the flash loan event log within the transaction.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the flash event occurred.
sender: AddressThe blockchain address of the user or contract that initiated the flash loan.
recipient: AddressThe blockchain address that received the flash loan.
amount0: U256The amount of token0 borrowed.
amount1: U256The amount of token1 borrowed.
paid0: U256The amount of token0 paid back (including fees).
paid1: U256The amount of token1 paid back (including fees).
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl PoolFlash
impl PoolFlash
Sourcepub fn new(
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_identifier: PoolIdentifier,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
ts_event: UnixNanos,
ts_init: UnixNanos,
sender: Address,
recipient: Address,
amount0: U256,
amount1: U256,
paid0: U256,
paid1: U256,
) -> Self
pub fn new( chain: SharedChain, dex: SharedDex, instrument_id: InstrumentId, pool_identifier: PoolIdentifier, block_number: u64, transaction_hash: String, transaction_index: u32, log_index: u32, ts_event: UnixNanos, ts_init: UnixNanos, sender: Address, recipient: Address, amount0: U256, amount1: U256, paid0: U256, paid1: U256, ) -> Self
Creates a new PoolFlash instance with the specified parameters.