This project sets up a Tenderly Web3 Action to monitor Lido validator exit requests and send notifications via Telegram when specific conditions are met.
- Tenderly CLI
- Node.js (version 16 or higher)
- npm
- A Telegram bot token and channel ID
- A Tenderly account and project
-
Clone this repository:
git clone <repository-url> cd <repository-name> -
Install dependencies:
npm install -
Set up your Tenderly project:
- Log in to your Tenderly account
- Create a new project or use an existing one
- Note down your
Account NameandProject Slug
-
Configure your
tenderly.yamlfile:- Replace the
<YOUR_ACCOUNT_ID>and<YOUR_PROJECT_SLUG>fields with your TenderlyAccount NameandProject Slug - Ensure the
action_namematches the name you want to use for your Web3 Action
- Replace the
-
Set up your secrets in Tenderly:
- Go to Web3 Actions inside your project
- Add the following secrets:
BEARER: Your Tenderly API bearer tokenBOT-TOKEN: Your Telegram bot tokenCHANNEL-ID: Your Telegram channel ID
To deploy the Web3 Action, use the Tenderly CLI:
tenderly actions deploy
This command will deploy the action defined in your tenderly.yaml file.
The Web3 Action (lidoEvents.ts) does the following:
- Listens for
ValidatorExitRequestevents from the Lido contract on the Ethereum mainnet. - When an event is detected, it retrieves the transaction details using the Tenderly API.
- It checks if the
stakingModuleIdis 1 and thenodeOperatorIdis 14. - If the condition is met, it sends a notification to the specified Telegram channel with details about the validator exit request.
To modify the conditions or add more events to monitor:
- Edit the
lidoEvents.tsfile. - Update the condition check in the
ifstatement to match your requirements. - Modify the message format or add additional information as needed.
- You can monitor your Web3 Action executions in the Tenderly dashboard.
- Check the Tenderly logs for any error messages or execution details.
- Ensure your Telegram bot has permission to send messages to the specified channel.
- This setup is specifically designed to monitor Lido validator exit requests on the Ethereum mainnet.
- The current configuration filters for
stakingModuleId: 1andnodeOperatorId: 14. Adjust these values as needed for your use case. - Ensure you have sufficient credits in your Tenderly account to run the Web3 Action.
For more information on Lido staking and node operator responsibilities, refer to the Lido documentation.