- Which address? -
TriggerSourceContract(one-time) orRecurringSourceContract(recurring) - On which network? -
TriggerChainIDorRecurringChainID
What activities does address tracking detect?
Address tracking detects several types of on-chain activity. Transactions involving the address Address tracking captures any transaction where the tracked address is the receiver (to == trackedAddress), including contract calls and direct transfers. It also detects transactions where the tracked address is the sender (from == trackedAddress), capturing all outbound activity.
Logs and events emitted by the contract
The tracker listens for any event emitted by the tracked contract, even without filtering by a specific event name. This essentially acts as a catch-all for any event emitted by this contract.”
State and balance changes
Although less common, address tracking can also detect native token balance changes and token balance changes for the address.
Address tracking vs event triggers
Kwala supports monitoring on-chain activity using event triggers and address tracking. Event triggers are more precise as they listen for specific contract events, while address tracking provides broader coverage by capturing all activity involving an address. The following table highlights the key differences:| Aspect | Event Trigger | Address Tracking |
|---|---|---|
| Specificity | Requires EventName and optional ABI | No EventName needed |
| Scope | Specific event only | Any activity for the address |
| Use case | Known, well-defined events | Unknown events, general monitoring |
| Configuration | TriggerEventName: Transfer(...) | ExecuteAfter: address_tracking |
ExecuteAfter and RepeatEvery values to create various monitoring patterns. The most common address tracking pattern is triggering a workflow once when address activity is detected then continue monitoring subsequent activities.
Trigger fields, while subsequent activity continues to trigger runs using the Recurring fields.
Address tracking runtime payload
When address tracking triggers your workflow, it passes a transaction receipt as input. This receipt contains details about the transaction that activated the trigger. A receipt contains the following key fields:| Field | Description |
|---|---|
from | Transaction sender (who initiated or signed the transaction) |
to | Contract/EOA being called or sent to (empty for contract deployments) |
contractAddress | Set only for contract deployments; otherwise null |
transactionHash | Unique identifier for the transaction |
chainId | Network identifier |
blockNumber | Block where the transaction was included |
logs | Array of events emitted during the transaction |
When
to is empty and contractAddress is set, this indicates a contract deployment transaction.transactionHash: Verify the activity on a block explorerchainId: Identify the networkblockNumber: Reference the specific blockfromorto: Identify the parties involved in the transactionlogs[]: Decode emitted events for advanced use cases
Using receipt data in dynamic actions
Dynamic actions can extract values from the runtime receipt using there.event(index) function, which maps to specific fields in Kwala’s runtime payload. While you can reference individual fields by index, the most reliable approach is to send the entire receipt to your backend for parsing.
transactionHash, chainId, blockNumber, from, to, and logs, then enrich notifications with explorer links and decoded details.
Parse receipt data
The receipt payload contains fields likefrom, to, logs, chainId, and topics that you can use in your downstream processing. For reliable parsing, send the raw receipt JSON to a smart contract or Web2 backend rather than extracting fields directly in the workflow.
Recommended parsing format (Go)
The following Go structs can be used to parse the receipt JSON in your Web2 service:
receipt.TransactionHash— Build explorer links and verify activityreceipt.ChainID— Identify the networkreceipt.ContractAddress— Identify the contract involved (if present)receipt.Logs— Inspect emitted eventslog.Address— Determine which contract emitted the loglog.Topics[]— Access event signatures and indexed parameterslog.Data— Access non-indexed event data
Example receipts
EOA to contract transfer The following example shows a receipt when a user wallet transfers ERC-20 tokens to a staking contractcontractAddress is null or 0x000... because this is not a contract deployment. The logs capture a standard ERC-20 Transfer event:
topics[0]= ERC-20 Transfer event signaturetopics[1]=fromaddress (EOA)topics[2]=toaddress (contract)data= transfer amount (here0x0de0b6b3a7640000= 1e18, or 1 token with 18 decimals)
Transfer events as assets move between addresses, while the pool contract emits a Swap event. The to field points to the DEX router contract, and the logs array captures all emitted events:
- Log #1:
Transfer— User → Pool, amount =0x2faf080(50 × 10⁶) - Log #2:
Transfer— Pool → User, amount =0x58d15e17628000(~0.025 × 10¹⁸) - Log #3:
Swap— Emitted by the pool contract
Many RPCs return
contractAddress as null, "", or 0x000...000 for non-deployment transactions where no contract is created.Example workflows
The following example shows a complete address tracking workflow that demonstrates both static and dynamic notification patterns. This workflow monitors an address on Polygon Amoy (chain ID80002) and fires two actions whenever activity is detected:
- NotifyStatic: Sends the same fixed message every time, useful for simple alerts
- NotifyDynamic: Sends transaction details extracted from the runtime payload using
re.event(index), where the index maps to specific fields from the activity event
Testing address tracking
To test your address tracking workflow:Deploy or pick a contract address
Use an existing contract address on chain
80002 (Polygon Amoy) or deploy a new one. The example workflow uses 0x18fcd17b107348bd54c05da39cf53621b892bcac.Trigger on-chain activity
Initiate any call or transaction involving that address. This could be a token transfer, a contract function call, or any other on-chain interaction.
Confirm your notification endpoint receives the payloads
Your webhook should receive two payloads:
- NotifyStatic: A fixed message (
"Address tracking triggered") sent every time - NotifyDynamic: Transaction details like
txHashandblockNumberpopulated fromre.event(index), where the index corresponds to the position of the value in the activity event data
Verify against a block explorer
Cross-reference the
txHash and blockNumber values from the dynamic payload against PolygonScan Amoy or your target chain’s explorer to confirm accuracy.Real-world use cases
The following example demonstrate how address tracking solves common blockchain monitoring challenges where you need to capture activities involving an address, not just specific events.Whale wallet tracking
Trading desks and analytics platforms monitor high-value wallets (“whales”) to detect market-moving activity before it impacts prices. The challenge: Whale wallets interact with dozens of protocols including DEXs, lending platforms, bridges, and more. Each protocol has different event signatures, and new DeFi protocols launch constantly. Maintaining event triggers for every possible interaction is unsustainable. By the time you’ve configured triggers for one protocol, others have launched. The solution: Address tracking monitors the whale’s wallet address and fires on any outbound or inbound activity. The goal is to track a whale wallet or contract and trigger your analytics or strategy pipeline on movement. You don’t need the event name; you just need to know “whale moved.” To do this, setExecuteAfter: address_tracking and RepeatEvery: address_tracking to continuously monitor whale activity.
Actions:
- Dynamic (using
re.event(0)): POST the dynamic event to your strategy service, which decides whether to buy, sell, or do nothing based on the transaction context
Treasury wallet monitoring
Address tracking is ideal for treasury wallets where funds can move through various methods: direct transfers, multisig executions, delegate calls, or contract interactions. Instead of configuring triggers for each scenario, you can use address tracking to monitor the treasury address directly and receive alerts whenever any on-chain activity occurs.Next steps
Triggers
Learn about all trigger types
Kwala Functions
Create custom on-chain logic
Actions
Configure workflow actions
YAML Basics
Master Kwala’s YAML syntax
