Skip to main content
This guide demonstrates how to build a monitoring system that tracks on-chain events, processes transaction data, and delivers real-time notifications through webhooks. It combines the trigger criteria of Tenderly’s Alert system with Web3Actions, covering setups from single-event tracking to multi-contract interactions.
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

Core Components

Transaction Processing

The system begins by processing transaction information:
showLineNumbers
This component:
  • 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
This section:
  • 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:
  1. Missing Events
    • Verify EVENT_NAME matches contract events exactly
    • Check alert configuration in Tenderly dashboard
    • Review transaction logs for event emission
  2. API Errors
    • Validate BEARER token permissions
    • Check API endpoint availability
    • Verify network configuration
  3. Webhook Issues
    • Confirm WEBHOOK_URL accessibility
    • Check payload format matches expectations
    • Monitor webhook endpoint logs