junobuild_shared::ledger::icp

Function find_payment

Source
pub async fn find_payment(
    from: AccountIdentifier,
    to: AccountIdentifier,
    amount: Tokens,
    block_index: BlockIndex,
) -> Option<BlockIndexed>
Expand description

Finds a payment transaction based on specified criteria.

§Arguments

  • from - The account identifier of the sender.
  • to - The account identifier of the receiver.
  • amount - The amount of tokens transferred.
  • block_index - The starting block index to search from.

§Returns

An option containing the found block indexed or None if not found.