Sends an alert to Discord and Twitter anytime an orchestrator gets paid.
Important
The hosted Livepeer subgraph has been deprecated. This bot now utilizes the Livepeer subgraph on The Graph for data retrieval from the Livepeer network. To access this service, you will need an API key and an account with sufficient GRT tokens for queries.
- npm - NVM is recommended for managing Node versions.
- Yarn
- MongoDB
- Vercel CLI
- A Graph API key
-
Ensure MongoDB is running:
sudo systemctl start mongod
-
To send alerts to a specific Discord channel, create a Discord webhook for that channel.
-
Install dependencies with
yarn install
. -
Rename the
.env.example
file to.env
and fill in the required environment variables:DISCORD_WEBHOOK_URL= # Discord webhook url API_TOKEN= # Bearer Token for API INFURA_KEY= # Infura API Key GRAPH_API_KEY= # The Graph API Key NODE_ENV=development # Environment (development, production)
The
NODE_ENV
variable should be set todevelopment
if you are using a local MongoDB database. -
Run the bot with
vercel dev
.
-
Create an Vercel account.
-
Create a Atlas account and create a new cluster.
-
Create a new database user with read and write access to the cluster.
-
To send alerts to a specific Discord channel, create a Discord webhook for that channel.
-
Add the environment variables found in the
.env.example
file to all environments (i.e. Production, Preview, Development) in the Vercel project with thevercel env add
command or through the Vercel dashboard. -
Deploy the bot with
vercel
. -
Setup a Vercel cron job to run the bot every 10 minutes.
{ "crons": [ { "path": "/api/update", "schedule": "*/10 * * * *" } ] }
-
Disable Vercel's Deployment Protection if you want to be able to call the
/api/update
endpoint remotely.