Basic event trigger
The following example demonstrates a basic event-based trigger that monitors a smart contract on Ethereum mainnet forTransfer events. Whenever tokens are transferred from the specified contract, this trigger will activate the workflow.
Filtered event trigger
You can add filters to specify which events trigger your workflow. For example, the following configuration only activates when transfers come from a specific address and exceed 1 token in value:- Exact match:
"0xAddress..." - Greater than:
">value" - Less than:
"<value" - Range:
">=value,<=value" - Multiple values:
["value1", "value2"]
Accessing event data
When event listeners subscribe to your event, they can access event data using there.event() syntax:
LowPolBalance(address,uint256), re.event(0) returns the address and re.event(1) returns the uint256 value.
Listening to Kwala Function events
Workflows can also listen to events emitted by Kwala Functions, enabling you to chain workflows together through computed events.Use cases
The following use cases show event listeners in action as part of theiw workflows:Cryptocurrency deposit alerts
Get notified when deposits arrive
Low balance notifier
Alert when wallet balance drops
