Alerts And Monitoring
We have a powerful monitoring engine that let's you monitor a smart contract with exactly the conditions you want
Last updated
We have a powerful monitoring engine that let's you monitor a smart contract with exactly the conditions you want
Last updated
There are some concepts to take care of. First, you need to login at demo.thirdeyelabs.xyz and create an account + organization. Bear in mind, Each organization has a notification limit of 5 for now, as we are just in our testing phase.
When you create a smart contract from the contracts page, You will be only then be able to create an alert for it which is the way to monitor transactions. Internally, In the backend, We start getting each transaction for the contract that you have submitted. We filter and send you only transactions that matter however from the YAML configuration you have set from the alerts page.
An alert configuration is the YAML configuration that runs every transaction we receive from the RPC.
Here are some existing presets from the preset page:
Feel free to recommend any new cool presets that you would like us to add in our collection on 0x0elliot on twitter.
Preset variables are variables you give to presets. Anything that starts with "$" in the YAML is a preset variable that you will have to fill.
In the YAML:
${GAS_PRICE_THRESHOLD} and ${WEBHOOK_URL} are presets that the user would have to fill.
Let's break down one of our simpler existing presets, The "Gas Price Threshold" preset.
Here is how it looks like:
alert_type: There are two types of alert types. One "every_transaction" and "cron_job".
alerts: You can by design define multiple alerts in an alert configuration.
nameA: Whatever you choose to call the alert (Reflects in your notification received)
notifications: There are multiple kinds of notifications you can enter here: send_webhook (works now), send_sms (coming soon) and send_email (coming soon).
webhook_url: If you select "send_webhook", enter the webhook URL in the field. Remember, anything that starts with "$" in the example is a placeholder for preset variables.
condition: This is the most beautiful part of the YAML. Here, you can define a condition that looks like python, but isn't exactly python. That means, you can introduce boolean logic, Make use of injected variables and functions (We have a bunch of special functions that we provide you), Use default python functions etc. And it runs pretty fast for itself.
The most important injected variable is txn. It contains all details passed by the RPC with a timestamp from our end. For ethereum, it might look like this:
Once you add your contract, Click on "manage"
Click on "Add now" to add ABI to the contract.
You can choose to both upload the contract or add Text.
With the ABI, now in both the YAML and the transaction received, you get the decoded input!
Notice how it's decoded now!