GuidesSmartAlert4 min read

How to set up smart contract monitoring in 5 minutes

A step-by-step guide to alerts for a contract on Ethereum, BNB Chain, Base or Arbitrum: add the address, turn on the first six rules, check them on 30 days of history and get alerts in Telegram.

This guide takes a deployed contract from "nobody is watching" to "the team gets a Telegram message when something is off". It uses SmartAlert, which reads public chain data and needs no change to the contract. You need:

  • a contract address on Ethereum, BNB Chain, Base or Arbitrum;
  • a Telegram account.

The free plan is enough to follow along. The first 14 days of a project work with Pro limits.

Step 1. Add the contract (1 minute)

  1. Sign up and create a project.
  2. Choose Add contract, pick the network and paste the address.
  3. For a verified contract, the ABI is loaded for you. For an unverified one, paste the ABI.

If SmartAlert has not seen the contract before, it first collects its history. The contract shows a "backfilling" status, and rules wait until it is done. If the contract is already tracked, its history is there at once.

The project's contracts: network, address and indexing state

Step 2. Turn on the first rules (2 minutes)

Open the contract. SmartAlert suggests rules from its ABI, and proxies, tokens and NFTs get matching templates. Select the ones that fit and choose Enable selected.

If you are not sure what to start with, these six cover the most common ways a contract gets taken over or drained:

WhyA new owner can call every admin function
SettingAny event, Critical
WhyA new admin on an AccessControl contract
SettingAny event, Critical
WhyThe code behind the address changed
SettingAny event, Critical
WhyThe drain itself, priced at the block
Settingfrom = your contract, a threshold above normal flow
WhyBursts that a fixed number misses at night
SettingAgainst the norm for each hour
WhyA broken integration or a stuck bot
SettingAgainst the norm for each hour

If you run keepers or relayers, add their wallets and a gas runway rule: an alert when gas is left for fewer than N days. For a treasury, add its address and a total below $X rule.

The full list is in alert recipes.

Step 3. Check each rule on history (1 minute)

Before a rule runs, open it and look at the chart. It shows the metric, the norm or your threshold, and marks where the rule would have fired over the past days.

A rule on a 7-day chart with the norm band and a mark where it would have fired
  • Admin rules should show zero or a few marks, each one a change you remember making.
  • For value and activity rules, too many marks means the threshold is too low. Raise it, or set a target such as "no more than 2 a week" and let SmartAlert pick the threshold.

Two ways to compare a value:

  • Against the norm for each hour (default). Each hour is compared with the same hour on previous days, so the threshold follows the time of day.
  • Own threshold. One number or range for all hours. Better for amounts in dollars and for admin events.

Step 4. Connect Telegram (1 minute)

  1. Open Channels, enter a name and press Add.
  2. Open the link SmartAlert gives you and press Start in the bot. To send alerts to a team chat, add the bot to the group and run the command there.
  3. The bot replies with the project name. The channel is active.

The link works for 15 minutes. On Pro you can also add Slack, Discord, email, PagerDuty or a webhook.

Project channels

What an alert looks like

When a rule fires, the message has the value, the threshold or this hour's norm, the time and a link to the transaction. When the condition clears, a "Back to normal" message follows.

An alert with the value, this hour's norm and a chart

Before you rely on it

  • Send Critical alerts to people who can act. An alert that reaches nobody with a pause key is a log entry.
  • Repeat on every chain you are deployed on. Attackers often go chain by chain, and the first chain's alert is the warning for the others.
  • Know the delay. SmartAlert reads confirmed blocks. On Ethereum that is 12 confirmations, about 144 seconds, and then a rule check: every 5 minutes on Free, every minute on Pro, every 30 seconds on Business.
  • Add contracts you depend on, not only your own. A locker, a bridge or a vault that holds your tokens is public, and you can watch it without anyone's permission.

Next

---

*I build SmartAlert. Questions about a specific contract are welcome in the comments.*

Try it free

An address is enough. The first 14 days get Pro limits, and rules are checked on history before they go live.