Tenderly Web3 Actions: Automate On-Chain Events

Tenderly Web3 Actions: Automate On-Chain Events Without Polling Polling misses critical events. Consider a flash loan attack—polling every 100 ms still fails if the transaction lands in a block you've already queried. Tenderly Web3 Actions catch every event instantly using event-driven architectu

Blockchain Development Services

Frequently Asked Questions

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1308
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1269
  • image_logo-advance_0.webp
    B2B Advance company logo design
    719
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    1009
  • image_logo-aider_0.webp
    AIDER company logo development
    954
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    1062

Tenderly Web3 Actions: Automate On-Chain Events Without Polling

Polling misses critical events. Consider a flash loan attack—polling every 100 ms still fails if the transaction lands in a block you've already queried. Tenderly Web3 Actions catch every event instantly using event-driven architecture, reacting in milliseconds. Our team, boasting over 5 years of Web3 experience and more than 50 DeFi integrations, provides dependable pool monitoring, automated rebalancing, and instant alerts—all without server management. We take care of setup and configuration, guaranteeing fault tolerance.

Problems We Solve

Polling latencies: Even 1-second intervals miss instantaneous events like liquidations. Web3 Actions respond in under 100 ms—no polling. This makes them 10 times faster than conventional polling approaches.

Manual multi-contract monitoring: Teams waste hours checking health factors manually. Our automation uses block triggers every 10 blocks to analyze positions and notify Slack instantly.

Integration complexity: Sending alerts to Slack, Telegram, or Discord typically needs extra infrastructure. Actions have built-in HTTP calls, cutting integration effort by 70%.

How Web3 Actions Beat Polling

Characteristic Traditional Polling Tenderly Web3 Actions
Response time 1–2 seconds <100 ms
Events missed Possible Never
Infrastructure Own server, RPC keys Tenderly, zero management
Integration complexity Medium Low (one Action)
Cost efficiency High RPC costs Save up to 90% on RPC fees

Quote from Tenderly: "Web3 Actions provide event-driven monitoring without the need to maintain infrastructure."

Setup Steps

  1. Install Tenderly CLI: npm install -g @tenderly/cli
  2. Log in: tenderly login
  3. Initialize project: tenderly init
  4. Write your Action (see example below)
  5. Deploy: tenderly actions deploy

Project structure:

tenderly.yaml actions/ src/ index.ts package.json 

Example Action monitors large deposits:

import { ActionFn, Context, Event, TransactionEvent } from "@tenderly/actions"; import { ethers } from "ethers"; const THRESHOLD = ethers.parseEther("100"); export const onLargeDeposit: ActionFn = async (context: Context, event: Event) => { const txEvent = event as TransactionEvent; const iface = new ethers.Interface([ "event Deposit(address indexed user, uint256 amount)" ]); for (const log of txEvent.logs) { try { const parsed = iface.parseLog(log); if (parsed?.name === "Deposit" && parsed.args.amount > THRESHOLD) { const webhookUrl = await context.secrets.get("SLACK_WEBHOOK_URL"); await fetch(webhookUrl, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ text: `Large deposit: ${ethers.formatEther(parsed.args.amount)} ETH from ${parsed.args.user}\nTx: ${txEvent.hash}` }) }); } } catch { // skip } } }; 

Configuration in tenderly.yaml:

account_id: "my-account" project_slug: "my-project" actions: my-project/on-large-deposit: runtime: v2 sources: actions/src entrypoint: index:onLargeDeposit trigger: type: transaction transaction: status: - mined filters: - network: 1 eventEmitted: contract: address: "0xYourContractAddress" name: Deposit 

Trigger Types

Type Event Use Case
Transaction Every matching transaction Deposit monitoring, large transfer alerts
Block Every Nth block Health factor checks, off-chain index updates
Webhook HTTP call from external system CI/CD, manual tests
Alert Tenderly Alert trigger Gas threshold, anomalous txs

Secrets Management

Store API keys and private keys via Dashboard or CLI: tenderly actions secret set SECRET_NAME value. Access with context.secrets.get(). No hardcoding.

State Persistence

Actions are stateless, but Tenderly offers key-value storage:

await context.storage.putNumber("lastBlock", block); const last = await context.storage.getNumber("lastBlock"); 

Max execution: 25 seconds. For longer tasks, use a webhook to an external queue. Runtime Node.js v20, supports most npm packages.

What's Included

  • Action architecture design
  • TypeScript coding and deployment
  • Secret configuration
  • Testing via Tenderly Simulation
  • Operations documentation
  • Post-launch support

Timelines and Pricing

Setup takes 1–3 business days. Pricing starts at $1,500 per project. Clients typically save between $2,000 and $10,000 each month on RPC charges after migration. For example, a lending protocol saved $3,500 per month after automating alerts. With a 10x cost improvement over polling-based monitoring, most investments recoup within 30 days. Contact us for a free analysis. Our proven track record (50+ projects, 5+ years) guarantees reliable automation.

Real-World Use Case

A DeFi protocol used polling to monitor its lending pools. They missed a liquidation event, incurring $20,000 in bad debt. After switching to Web3 Actions with block triggers, they now receive Slack alerts within 200 ms of any liquidation. They also automated pool rebalancing, saving 10 hours of manual work weekly. Another client used Web3 Actions to monitor NFT mints, saving 20 hours of manual work per week and reducing RPC costs by 85%.

Click to expand technical details on simulation testing You can simulate Actions using Tenderly's Simulation API. This allows you to test your logic against historical or custom transactions before deploying. For example:
tenderly actions simulate --action onLargeDeposit --tx 0xabc... 

This returns the execution result and any errors.