Structure
The following is an example of a usecase rule to send an alert when withdrawal fee of a liquidity pool is above 50%:
Input
The input is a destructured object with following keys:
judger
judger
The judger module contains a function that is specifically designed to retrieve details of an event. The function can vary depending on the type of event as defined in the target configuration.
See https://gitlab.com/inspexco/frontend/gitbook/-/blob/gitbook/usecase-rules/broken-reference/README.md for more information.
event
event
The judger module contains a function that is specifically designed to retrieve details of an event. The function can vary depending on the type of event.
See https://gitlab.com/inspexco/frontend/gitbook/-/blob/gitbook/usecase-rules/broken-reference/README.md for more information.
utils
utils
The utils module from ethers.js
provides a collection of utility functions that offer common functionality and helper methods for working with Ethereum and blockchain-related tasks.
dataSource (in development)
dataSource (in development)
A data source is an external information not present in current events, but is useful in determining whether the event should be alerted or not.
Only data sources explicitly chosen to be injected in the usecase rule can be called.
Each data source has different specification.
See https://gitlab.com/inspexco/frontend/gitbook/-/blob/gitbook/usecase-rules/broken-reference/README.md for more information.
Output
The input is an object with following keys:
isAlert
isAlert
boolean
Should be true
if the event should be alerted. false
otherwise.
Default: false
message
message
string
The message that will return as a result message when simulation judger.
Default: ""
Last updated