Smart contract guide

How to monitor smart contract events

To monitor smart contract events, you tell Alerts on Chain which contract and which events to watch, and each match arrives as a Telegram message. Smart contracts announce what they do through events: a token emits Transfer, a protocol emits OwnershipTransferred or Paused, a DAO emits ProposalCreated. Method calls can be watched the same way, and both can be filtered on their arguments by name. This guide covers picking the contract and the event, adding conditions, and the limits.

Just want the alert? See smart contract event alerts

6 min read

Events and method calls

A rule on a contract listens for one of two things. "Event emitted" fires on a log the contract writes, which is how most protocols report state changes. "Method called" fires when a transaction calls one of the contract's functions directly, with a choice of succeeded, failed or either.

Both are described in plain words in the alert: arguments the headline doesn't already state appear as lines underneath, with names humanised and up to four fields shown.

Example alert
ContractExample

Ownership moved from 0x3f5c…e0b7 to 0x9f2c…9a71

Contract 0x87b1…4e2a · Rule: Everything on the contract

Ethereum · View on Etherscan09:41

Find the contract and its events

Pick a well-known contract from the list in the address field, or paste any contract address. For a listed contract, the event picker shows the events it emits under "Events of this contract"; for any contract, the standard catalog is there too, so you can pick events by name, with their arguments.

  • Proxy contracts: watch the proxy address, which is where the events are emitted.
  • Anything else: paste an event signature with parameter names, such as Transfer(address indexed from, address indexed to, uint256 value), or a method signature or 4-byte selector.
  • Common standards (ERC-20, NFTs, Uniswap-style swaps, Aave-style lending, Governor DAOs, Seaport) are in a built-in catalog, and each has a template.

Pick the event

The Everything on a contract template starts with one rule on "Every event on this contract". The event picker shows an estimate of how many events a day that would be, against your plan. To watch one event instead, open the rule and choose it from the catalog, or paste its signature.

Picking specific events keeps the rule to the transactions that emit them, and lets you filter on their arguments. "Every event" has no single event to name the arguments, so it can only be filtered on the caller.

Source

Contract

0x87b1…4e2a

Rule

Admin method called

pause()

Telegram alert
ContractExample

0x3f5c…e0b7 paused the contract

Contract 0x87b1…4e2a · Rule: Admin method called

Ethereum · View on Etherscan09:41

Filter on arguments

Conditions refer to arguments by name and offer the operators the argument's type allows. All the conditions on a rule must match.

  • Addresses: is, is not, is one of, is not one of. For example, to is one of your wallets.
  • Numbers: is at least, is at most, greater than, less than. Values are raw integers unless you set the token's decimals.
  • Strings and bytes: is, or contains.
  • Arrays and structs: [] means "any element", as in ids[] or offer[].token.
  • Transaction fields: Caller (tx.from) is, or is not, one of a list, and the ETH value sent.
Example alert
TokenExample

0x3f5c…e0b7 approved 0x9f2c…9a71 to spend unlimited USDC

  • ⚠️ Unlimited allowance: the spender can move the whole balance

Contract USDC (0xa0b8…eb48) · Rule: Token approvals

Ethereum · View on Etherscan09:41

Ready-made contract templates

If your contract follows a standard, a template sets the event and conditions for you:

  • Token transfers and Token approvals for ERC-20 tokens; unlimited approvals are flagged.
  • NFT mints, NFT activity and NFT sales for collections and Seaport.
  • DeFi swaps for Uniswap V2 and V3 style pools, and Lending activity for Aave-style markets.
  • DAO governance for new proposals and votes.
  • Admin method called and Caller outside an allow-list, for contracts you operate.

Limits to know

Contract alerts are flexible, but a few things are out of scope today:

  • Method calls are direct calls only: the transaction is sent to the contract. Calls routed through Safes, routers, multicall or smart accounts are coming with Premium.
  • Amount conditions compare raw token units; there are no USD values yet.
  • Every transaction the rule sees counts as one event, matched or not. The free Beta plan needs no card and includes 1 wallet, 1 contract and 100 events a month. Paid tiers go from 5,000 to 2,000,000 events a month.
  • Paid tiers watch up to 50 contracts.
  • Ethereum mainnet only. More networks are planned, but none is live yet.
  • Telegram is the only live channel. Discord, Slack, email and webhooks are coming.

Set it up step by step

From sign-in to your first alert, in the actual dashboard.

  1. 1
    Sign in at alertsonchain.com with Google or with your wallet. A wallet sign-in is a signed message, not a transaction, so it costs no gas.
  2. 2
    Open the Channels tab and connect Telegram: start a chat with @alertsonchain_com_bot, send /start, and paste the 8-character code it replies with.
  3. 3
    Open the Everything on a contract template, or a more specific contract template if your contract follows a standard.
  4. 4
    Paste the contract address as the source. Use the proxy address for upgradeable contracts.
  5. 5
    Open the rule and choose the event from the catalog, or paste the event or method signature, or keep every event.
  6. 6
    Add conditions on the arguments you care about and pick the Telegram chat the rule sends to.
  7. Click Create rule. The rule is active straight away, and the next matching transaction sends a Telegram message.

Frequently asked questions

  • Does the contract need to be verified on Etherscan?

    No. Standard events (and, for well-known contracts, the events they emit) are picked by name from the catalog. For anything else, paste an event signature with parameter names, or a method signature or selector. The contract's Etherscan page is a good place to copy a signature from.

  • Is watching every event on a contract a paid feature?

    No. Everything on a contract is part of the base plan. Each transaction it sees counts toward your monthly events like any other rule, and the event picker estimates the daily volume before you save.

  • Can I alert on calls that go through a Safe or a router?

    Not yet. Method-call alerts cover direct calls to the contract. Calls made by other contracts, such as Safes, routers and multicall, are coming with Premium. Events are emitted either way, so an event alert often covers the same action.

  • Can I filter on an event's arguments?

    Yes. Conditions name the argument and compare it with is, is one of, greater than, contains and similar operators, depending on its type.