watch_src20_events_with_key
Watch SRC20 events with an explicit viewing key
Overview
Signature
def watch_src20_events_with_key(
w3: Web3,
*,
viewing_key: Bytes32,
token_address: ChecksumAddress | None = None,
on_transfer: TransferCallback | None = None,
on_approval: ApprovalCallback | None = None,
on_error: ErrorCallback | None = None,
poll_interval: float = 2.0,
from_block: int | str = "latest",
) -> SRC20EventWatcher
async def async_watch_src20_events_with_key(
w3: AsyncWeb3,
*,
viewing_key: Bytes32,
token_address: ChecksumAddress | None = None,
on_transfer: AsyncTransferCallback | TransferCallback | None = None,
on_approval: AsyncApprovalCallback | ApprovalCallback | None = None,
on_error: AsyncErrorCallback | ErrorCallback | None = None,
poll_interval: float = 2.0,
from_block: int | str = "latest",
) -> AsyncSRC20EventWatcherParameters
Parameter
Type
Required
Description
Returns
Type
Description
Examples
Basic Usage (Sync)
Watch Specific Token
Read-Only Monitoring
With Context Manager
Error Handling
Historical Events
Async Usage
Async Context Manager
Monitor Multiple Keys
How It Works
Callback Signatures
Transfer Callback
Approval Callback
Error Callback
Notes
Warnings
See Also
Last updated

