Onchain.Tempo.Transfer (onchain_tempo v0.1.1)

Copy Markdown View Source

Tempo-specific TransferWithMemo event log parsing.

TIP-20 extends ERC-20 with transferWithMemo(address,uint256,bytes32). This module parses the corresponding event logs. Standard Transfer event parsing is handled by Onchain.Transfer in the core onchain package.

Usage

receipt = Onchain.Tempo.RPC.parse_receipt(raw_receipt)
memo_transfers = Onchain.Tempo.Transfer.parse_transfer_with_memo_logs(receipt.logs)

Summary

Functions

Parse TransferWithMemo events from a list of atom-keyed log entries.

Returns the TransferWithMemo event signature string.

Functions

parse_transfer_with_memo_logs(logs)

@spec parse_transfer_with_memo_logs([map()]) :: [map()]

Parse TransferWithMemo events from a list of atom-keyed log entries.

Returns a flat list of maps with :token, :from, :to, :amount, :memo keys. Non-matching logs are silently skipped.

The output shape matches Onchain.Transfer structs with an additional :memo field, enabling uniform matching in callers.

transfer_with_memo_sig()

@spec transfer_with_memo_sig() :: String.t()

Returns the TransferWithMemo event signature string.