How To Monitor Smart Contracts Automatically, For Free

Traditional financial markets are only open during business hours, closed on the weekends, and take off for holidays. In contrast, crypto never sleeps. The blockchain never takes a day off (unless it’s Cardano). Handling this deluge of information is impossible for a single person to handle, and trying to ingest it all manually is inefficient.

But what if you can’t code bots to watch the chain for you? Fear not! I’ve written this quick guide on how to monitor smart contracts automatically, using simple, free tools.

Why You Need Alerts

I know a thing or two about the power of alerts. In my day job, I spend a lot of time looking at trends and data from running processes. Just by looking at a number, it can be hard to tell what’s actually going on in a system. If the temperature of this machine is 50 C, is that low? High? Way too high and about to explode? What’s the context?

Properly configured alarm conditions let me skim through reams of data and ignore the stuff that’s running fine, to focus on what’s messed up or important. It also frees up brainpower from having to watch the parameters all the time. You could never keep up with everything properly on your own.

In crypto, having timely notice of important things is especially critical as the timescales are accelerated. A pending transaction landing in a multisig could turn into a hard rug in a matter of minutes. A contract being paused could immediately begin causing expensive failed transactions for your arbitrage bot.

Maybe you want to know when known scammers move their money into one of your projects. Automatic alerts can help.

Alert Systems For Non-Coders

All information on the blockchain is publicly available. You are absolutely free to spin up your own node and run your own monitoring bots – and if you have the means to do it, some might argue that you should do it. But for those of us without the time, resources, or technical inclination to run our own monitoring units, we can employ some centralized services to do the heavy lifting for us.

The two services we’ll look at are Tenderly and OpenZeppelin Defender. Both offer free plans and no credit card is required, although you will have to make an account.

Tenderly is a very comprehensive information suite, with the ability to simulate transactions and setup custom analytics. OpenZeppelin Defender is designed more for protocol administration/operation, but has the alerting and custom analytics that we’ll need.

Setting An Alert In Tenderly

After making an account, head to the dashboard and look for the Alerting tab of the sidebar menu.

Next, go to New Alert.

For this demo, I’m going to watch the Wonderland Money multisig on AVAX for changes to the multisig owners. That function emits an event, so I’m going to watch for Event Emitted.

Select the Target type as Address and paste in the multisig address, then select the contract that shows up.

Next, select the desired event you want to watch for. Tenderly has automatically pulled the contract’s ABI, so it knows what the contract’s code is. I’m going to watch for OwnerAddition.

Lastly, set how you want to receive your alerts, and click save! Note that if you want to track other events, you need to set up an alert for each of them. You can duplicate the one you just made to save some time.

Setting An Alert In Defender

After making your account, go to the Sentinel sidebar tab, then click Add first Sentinel.

We’ll set this up to watch the same Wonderland multisig as in the Tenderly demo. You want the Contract sentinel type, Forta refers to more advanced agents from another OpenZeppelin product. You can see my setup below.

Paste in the address, then you need to retrieve the contract ABI. OpenZeppelin does not do this for you automatically.

To do that, go to the Contract code section on Snowtrace, and look for the contract ABI. Then hit the copy button, and paste it into the ABI box in Defender.

Here’s my full setup.

Click Next, then we’ll set up what to track for. Note that this product lets us track multiple events with the same Sentinel agent. You can get highly specific on what conditions to trigger on, and even trigger tasks to run automatically, but this is all you need for right now.

(Don’t know how to tell what events do what? Check out How To Read Smart Contracts Without Knowing Solidity)

Hit Next, setup your notification, and you’re off to the races!

Wrapping Up

Well-configured automatic notifications can cut through the noise and deliver prompt, relevant information to keep you and your bags safe. I highly recommend signing up for one of these products with a burner email and playing with them. They are user friendly and require no coding experience to operate.

The world is your oyster. Get an email summary of a DAO’s onchain transactions. Set up a Discord bot for your private alpha group to stalk Tetranode’s wallets. Automatically watch the network for times of low gas. Do whatever you think would be useful!

Photo of author

Written By BowTiedPickle

Anonymous cartoon pickle inspired by BowTiedBull. Degen chemical engineer, moonlighting as a Solidity developer.

Disclosure

This article may contain links to third-party websites or other content for information purposes. BowTiedIsland may receive a commission at no cost to you if you purchase a product after clicking one of these links. The Third-Party Sites are not under the control of BowTiedIsland, and BowTiedIsland is not responsible for the content of any Third-Party Site. All information contained herein is the opinion of the writer and does not constitute financial advice. We aim to act as a neutral third party and aid in your research and analysis.


The Jungle


Crypto, Investing, and E-Commerce with BowTied Bull

The future is internet based, therefore we have a triangle based approach with crypto, e-commerce business making and Investing in traditional assets

The Culture War with BowTiedRanger

Whether you’re a political junkie or just interested in current events. 

You’ve come to the right place for analysis of the most relevant current events and political issues.

Fitness With BowTiedOx

BowTiedOx provides you a place to find all of his latest programs and guides.

Weekly newsletters that cover fitness, health, and mindset, all grounded in the fundamentals of physiology.

Media Production with BowTied Turkey and BowTied Tamarin

Video is no longer optional.

Don’t get left behind.

Your brand deserves professional videos to engage your audience.

Art & Graphic Design with BowTied Patriot

BowTied Patriot is a graphic artist who specializes in photography, mixed medium custom artwork, and NFT creation.

Join BowTiedPatriot as he dives into making Art in Web3.0 and The Metaverse.

Cooking with BowTiedOctopod

Learn secrets from a fine dining chef for maximum flavor and time-saving efficiency

Newsletters on Ingredients, Techniques and Flavor hacks that will have you eating better. We will never eat bugs!

Meme Warfare with DgenFren

Increase your online engagement, organically influence narratives, and build your online persona by using marketing that your target audience actually wants: memes.

Learn How to Sell with BowTiedSalesGuy

Sales is one of the most transferrable life skills, yet few know how to actually sell.

Traditional sales tactics don’t cut it in today’s hyper competitive world.

Learn the secrets from a Chad Salesman and change your Life forever.

Ecommerce with BowTiedOpossum

Learn the skills to start and build your first online business.

Want to build a business that travels with you?

Learn from an industry veteran that has worked on and with brands you already know.