pub struct TongoEventReader { /* private fields */ }Expand description
Reads and parses TONGO events from Starknet.
Implementations§
Source§impl TongoEventReader
impl TongoEventReader
pub fn new( provider: Arc<JsonRpcClient<HttpTransport>>, contract_address: CoreFelt, ) -> Self
Sourcepub async fn get_fund_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<FundEvent>>
pub async fn get_fund_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<FundEvent>>
Fetch fund events for a public key.
Sourcepub async fn get_outside_fund_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<OutsideFundEvent>>
pub async fn get_outside_fund_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<OutsideFundEvent>>
Fetch outside fund events for a public key.
Sourcepub async fn get_withdraw_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<WithdrawEvent>>
pub async fn get_withdraw_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<WithdrawEvent>>
Fetch withdraw events for a public key.
Sourcepub async fn get_ragequit_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<RagequitEvent>>
pub async fn get_ragequit_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<RagequitEvent>>
Fetch ragequit events for a public key.
Sourcepub async fn get_rollover_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<RolloverEvent>>
pub async fn get_rollover_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<RolloverEvent>>
Fetch rollover events for a public key.
Sourcepub async fn get_transfer_in_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<TransferEvent>>
pub async fn get_transfer_in_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<TransferEvent>>
Fetch transfer events where pub_key is the recipient.
Sourcepub async fn get_transfer_out_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<TransferEvent>>
pub async fn get_transfer_out_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<TransferEvent>>
Fetch transfer events where pub_key is the sender.
Sourcepub async fn get_balance_declared_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<BalanceDeclaredEvent>>
pub async fn get_balance_declared_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<BalanceDeclaredEvent>>
Fetch balance declared events for a public key.
Sourcepub async fn get_transfer_declared_from_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<TransferDeclaredEvent>>
pub async fn get_transfer_declared_from_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<TransferDeclaredEvent>>
Fetch transfer declared events where pub_key is the sender.
Sourcepub async fn get_transfer_declared_to_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<TransferDeclaredEvent>>
pub async fn get_transfer_declared_to_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<TransferDeclaredEvent>>
Fetch transfer declared events where pub_key is the recipient.
Sourcepub async fn get_all_events(
&self,
pub_key: &ProjectivePoint,
from_block: Option<u64>,
to_block: Option<u64>,
) -> Result<Vec<TongoEvent>>
pub async fn get_all_events( &self, pub_key: &ProjectivePoint, from_block: Option<u64>, to_block: Option<u64>, ) -> Result<Vec<TongoEvent>>
Fetch all event types for a public key, sorted by block number (descending).
Auto Trait Implementations§
impl Freeze for TongoEventReader
impl !RefUnwindSafe for TongoEventReader
impl Send for TongoEventReader
impl Sync for TongoEventReader
impl Unpin for TongoEventReader
impl UnsafeUnpin for TongoEventReader
impl !UnwindSafe for TongoEventReader
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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