pub struct PoolFlash {Show 15 fields
pub chain: SharedChain,
pub dex: SharedDex,
pub instrument_id: InstrumentId,
pub pool_address: Address,
pub block: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub ts_event: Option<UnixNanos>,
pub sender: Address,
pub recipient: Address,
pub amount0: U256,
pub amount1: U256,
pub paid0: U256,
pub paid1: U256,
}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_address: AddressThe blockchain address of the pool smart contract.
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: Option<UnixNanos>The UNIX timestamp (nanoseconds) when the 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).
Implementations§
Source§impl PoolFlash
impl PoolFlash
Sourcepub fn new(
chain: SharedChain,
dex: SharedDex,
instrument_id: InstrumentId,
pool_address: Address,
block_number: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
ts_event: Option<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_address: Address, block_number: u64, transaction_hash: String, transaction_index: u32, log_index: u32, ts_event: Option<UnixNanos>, sender: Address, recipient: Address, amount0: U256, amount1: U256, paid0: U256, paid1: U256, ) -> Self
Creates a new PoolFlash instance with the specified parameters.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PoolFlash
impl<'de> Deserialize<'de> for PoolFlash
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<'py> IntoPyObject<'py> for PoolFlash
impl<'py> IntoPyObject<'py> for PoolFlash
Source§impl PyClassImpl for PoolFlash
impl PyClassImpl for PoolFlash
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// 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.
const RAW_DOC: &'static CStr = /// 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.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = SendablePyClass<PoolFlash>
type ThreadChecker = SendablePyClass<PoolFlash>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl PyClassNewTextSignature for PoolFlash
impl PyClassNewTextSignature for PoolFlash
const TEXT_SIGNATURE: &'static str = "(chain, dex, pool_address, instrument_id, block, transaction_hash, transaction_index, log_index, sender, recipient, amount0, amount1, paid0, paid1, timestamp)"
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut PoolFlash
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut PoolFlash
Source§impl PyMethods<PoolFlash> for PyClassImplCollector<PoolFlash>
impl PyMethods<PoolFlash> for PyClassImplCollector<PoolFlash>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PoolFlash
impl PyTypeInfo for PoolFlash
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.impl DerefToPyAny for PoolFlash
impl StructuralPartialEq for PoolFlash
Auto Trait Implementations§
impl Freeze for PoolFlash
impl RefUnwindSafe for PoolFlash
impl Send for PoolFlash
impl Sync for PoolFlash
impl Unpin for PoolFlash
impl UnwindSafe for PoolFlash
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> FromPyObject<'_> for Twhere
T: PyClass + Clone,
impl<T> FromPyObject<'_> for Twhere
T: PyClass + Clone,
§fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
fn extract_bound(obj: &Bound<'_, PyAny>) -> Result<T, PyErr>
§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
§fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
fn from_py_object_bound(ob: Borrowed<'_, 'py, PyAny>) -> Result<T, PyErr>
§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§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
SeparatorPolicy. Read more