This guide assumes you have a Tenderly account and basic familiarity with Web3Actions and blockchain events.
Modular Monitoring with Web3Actions
Prerequisites
Before starting, ensure you have:- Node.js (v20 currently supported as latest version)
- Tenderly CLI installed
- A webhook endpoint for receiving data
- Basic understanding of TypeScript
System Setup
1
Create Alert
2
3

4
5

6
7

8
9
Install Dependencies
10
11
cd actions && npm install
12
Configure Environment Variables
13
Set up these Secrets in your Tenderly Web3Action:
14
WEBHOOK_URL = <Your webhook URL>
BEARER = <Your Tenderly API bearer token>
ACCOUNT_SLUG = <Your Tenderly account slug>
PROJECT_SLUG = <Your project slug>
EVENT_NAME = <Name of the event to track>
15
Configure tenderly.yaml
16
Your
tenderly.yaml should look like this:17
account_id: "<YOUR_ACCOUNT_ID>"
actions:
<YOUR_ACCOUNT_ID>/<PROJECT_SLUG>:
runtime: v2
sources: actions
specs:
example:
description: "Event tracking system"
function: example:modularFn
trigger:
type: alert
alert: { <YOUR_ALERT_ID> }
execution_type: parallel
project_slug: "<PROJECT_SLUG>"
18
Be sure to replace the placeholders with following values:
19
YOUR_ACCOUNT_ID: Your account ID you can get following this guide.PROJECT_SLUG: Your project slug you can get following this guide.YOUR_ALERT_ID: The ID of alert you’ve created in the previous step. You can find the ID in the dashboard.20

21
Deploy your Web3 Action
22
Run the following command to deploy your Web3 Action:
23
tenderly actions deploy
Core Components
Transaction Processing
The system begins by processing transaction information:showLineNumbers
- Captures transaction hash and network
- Retrieves transaction traces via Tenderly API
- Processes block information
Contract Information Retrieval
Contract information (names and ABIs) are fetched using the Contracts API.showLineNumbers
Event Processing
Event processing is handled through specialized functions:showLineNumbers
- Filters events by name
- Extracts event parameters
- Processes event addresses
Webhook interaction
The system sends this structured data to your webhook using Axios:showLineNumbers
Troubleshooting
Common issues and solutions:-
Missing Events
- Verify EVENT_NAME matches contract events exactly
- Check alert configuration in Tenderly dashboard
- Review transaction logs for event emission
-
API Errors
- Validate BEARER token permissions
- Check API endpoint availability
- Verify network configuration
-
Webhook Issues
- Confirm WEBHOOK_URL accessibility
- Check payload format matches expectations
- Monitor webhook endpoint logs