Example: Trigger via Forta Notifications
You can let Forta trigger your Easy Trigger and as a result, call your smart contract. This can be useful, e.g. if you want to pause your contract on a potential attack. (see Automatically trigger OpenZepplin's Pausable)
Prerequisites
You will first need to Configure your Smart Contract and Create an Easy Trigger.
You will also need an ethereum wallet for Polygon Mainnet in order to create a Forta notification.
Create an Ethereum Wallet
You can use a wallet provider like Metamask. Add Metamask to your browser and create an account. Once you open the Metamask browser plugin, it is connected to Ethereum Mainnet by default.
Switch Wallet to Polygon
Click on Ethereum Mainnet and then on Add network and add Polygon Mainnet.
Finally, choose the Polygon Mainnet network from the dropdown at the top of the Metamask browser plugin.
Log-In to Forta
Go to https://app.forta.network/notifications.
Click Sign In With Wallet at the top right. This will open a popup of Metamask (or any other Wallet you are using) where you have to sign the Forta request.
Once your signed in, click on Add subscription, where you should see the following popup:
In the Select Subscription type dropdown you can one of the options, e.g. one of the Forta Curated selection of bots. Alternatively you can also also fist search for a specific bot.
If your Easy Trigger will, e.g. pause your smart contract, we highly recommend adding a filter that Forta will only call your Webhook on Critical severity alerts. Setting an appropriate filter is important as your trigger will be executed whenever the associated webhook receives a request.
To add a filter, click Add Filter, select Min Severity and then CRITICAL.
Depending on what bots you select, enter your Contract address in Addresses to watch.
Finally click on Webhook under Notify me via and enter the Webhook Url from your Easy Trigger.