This Cloudflare Worker is designed to monitor account balances and RAM usage for specified accounts on Antelope blockchain networks (such as EOS). When certain thresholds are met, the worker sends an alert to a specified Slack channel.
- Monitors multiple blockchain accounts across different Antelope chains.
- Checks both liquid balance and RAM usage.
- Sends alerts to a Slack channel when thresholds are crossed.
- Node.js and npm installed.
- Cloudflare account with access to Workers.
- Configured Slack Webhook URL.
-
Clone the repository:
git clone https://yourrepositoryurl.git cd your-repo-directory
-
Install dependencies:
npm install
-
Configure your
wrangler.toml
file with your Cloudflare account details and settings. Ensure your Slack Webhook URL is set correctly in the[vars]
section. -
Set up your
config.json
file according to your monitoring needs. Define the accounts, chains, and thresholds as required.
-
Log in to your Cloudflare account using Wrangler:
wrangler login
-
Publish the worker:
wrangler publish
The worker is now deployed and will run according to the schedule defined in wrangler.toml
.
The worker operates automatically according to the defined schedule. Alerts will be sent to the configured Slack channel whenever an account's balance or RAM usage crosses the set thresholds.
Refer to the config.json
file for configuring the accounts, chains, and threshold values. The structure is as follows:
{
"accounts": [
{
"name": "teamgreymass",
"chain": "EOS",
"thresholdBalance": 10,
"thresholdRAM": 500
}
],
}