Event Watching
Watch and decrypt SRC20 Transfer and Approval events
Overview
Quick Start
Watch Your Own Events
import os
from seismic_web3 import create_wallet_client, PrivateKey
from seismic_web3.src20 import watch_src20_events
private_key = PrivateKey.from_hex_str(os.environ["PRIVATE_KEY"])
w3 = create_wallet_client("https://gcp-1.seismictest.net/rpc", private_key=private_key)
watcher = watch_src20_events(
w3,
encryption=w3.seismic.encryption,
private_key=private_key,
on_transfer=lambda log: print(f"Transfer: {log.decrypted_amount}"),
)
# Later...
watcher.stop()Watch with Explicit Key
Factory Functions
Function
Description
Watcher Classes
Class
Description
Event Types
Type
Description
How It Works
Sync vs Async
Sync (Threading)
Async (asyncio)
Common Patterns
Context Manager
Error Handling
Filter by Token
Historical Events
See Also
Last updated

