Sends an alert to Discord and Twitter anytime an orchestrator gets paid.
- npm - NVM is recommended for managing Node versions.
- Yarn
- MongoDB
- Vercel CLI
-
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 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.