Comment on page
Monitoring Bot Setup
The oSnap Monitoring Bot monitors all transactions to your oSnap module. It also verifies that proposed transactions are valid according to the rules of the oSnap module (ie. the snapshot quorum and voting period meet the oSnap rules). Any unverified proposed transactions should be reviewed further and possibly disputed.
All oSnap propsals are already monitored by bots run by UMA's core team and a decentralized group of human verifiers. You may wish to run this bot so you can monitor your oSnap module yourself.
Get the latest UMA protocol image that among others includes the required monitoring bot:
docker pull umaprotocol/protocol:latest
Initialize new project directory and install
@uma/monitor-v2package that contains the oSnap monitoring bot:
npm init -y
npm install @uma/monitor-v2
All configuration for the monitor bot should be set in a .env file in your working directory. Please see basic configuration variables below:
# Note on formatting: Do not enclose variable values in quotes as this is not supported when running the bot in Docker container.
# Name of the bot identifier as shown in alerts.
BOT_IDENTIFIER=oSnap Monitor Bot
# the address of the deployed Optimistic Governor that this bot will monitor. This does not necessarily need to be deployed through factory.
# network number (ie. Ethereum mainnet = 1)
# a single RPC node URL replacing `X` in variable name with `CHAIN_ID`. This is considered only if matching `NODE_URLS_X` in the advanced config section is not provided.
# boolean enabling/disabling monitoring transactions proposed (`false` by default).
# boolean enabling/disabling monitoring transactions executed (`false` by default).
# boolean enabling/disabling monitoring proposal executed (`false` by default).
# boolean enabling/disabling monitoring proposal deleted (`false` by default).
# boolean enabling/disabling monitoring set collateral and bond amount (`false` by default).
# boolean enabling/disabling monitoring set rules (`false` by default).
# boolean enabling/disabling monitoring set liveness (`false` by default).
# boolean enabling/disabling monitoring set identifier (`false` by default).
# boolean enabling/disabling monitoring set escalation manager (`false` by default).
# used to simulate proposed transaction execution on Tenderly. If any of these are missing, the bot will skip the simulation.
Instruct docker to run the oSnap monitor bot by appending
COMMANDenvironment variable to the same
.envfile where other configuration is stored:
# Command to run when starting docker container:
Start the monitoring bot from the same working directory where the
.envconfiguration file is located:
docker run -d --env-file .env --name osnap-monitor --rm umaprotocol/protocol:latest
This should start the oSnap module monitoring bot in a looping mode detached from console where all configured events will be sent to the provided notification channels.
Stop the running bot container with:
docker stop -t 0 osnap-monitor
Start the monitoring bot from the root of your project directory where node package was installed and
.envconfiguration file is stored:
This starts the oSnap module monitoring bot in a looping mode where all configured events will be logged in the console.