Skip to content

Watches ADAMANT blockchain transactions, notifies about specific ones, recoups fees

Notifications You must be signed in to change notification settings

Adamant-im/adamant-watchbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADAMANT Watchbot is a software that watches ADAMANT blockchain transactions, notifies about specific ones, and able to recoup some of them according to your settings.

Features

  • Easy to install and configure
  • Free and open source
  • Notifies about specific transactions
  • Recoups specific transactions or its fees
  • Managed with your commands using ADAMANT Messenger

Usage and Installation

After installation, you control the bot in secure ADAMANT Messenger chat directly.

Available commands: ask a bot with /help command.

Requirements

Setup

su - adamant
git clone https://github.com/Adamant-im/adamant-watchbot
cd ./adamant-watchbot
npm i

Pre-launch tuning

nano config.json

Parameters:

  • passPhrase The bot's secret phrase for accepting commands. Obligatory. Bot's ADM address will correspond this passPhrase.
  • admin_accounts <string, array> ADAMANT accounts to accept commands from. Commands from other accounts will not be executed. At lease one account.
  • notify_non_admins Notify non-admins that they are not admins. If false, bot will be silent.
  • node_ADM <string, array> List of nodes for API work, obligatorily
  • infoservice <string, array> List of ADAMANT InfoServices for catching exchange rates, recommended
  • slack <string, array> Tokens for Slack notifications. No alerts if not set.
  • adamant_notify <string, array> ADM addresses for notifications. Recommended.
  • socket If to use WebSocket connection. Recommended for better user experience.
  • ws_type Choose socket connection, "ws" or "wss" depending on your server
  • bot_name Bot's name for notifications
  • welcome_string How to reply user in-chat, if unknown command received

Launching

You can start the Bot with the node app command, but it is recommended to use the process manager for this purpose.

pm2 start --name watchbot app.js

Add Bot to cron

crontab -e

Add string:

@reboot cd /home/adamant/adamant-watchbot && pm2 start --name watchbot app.js

Updating

su - adamant
cd ./adamant-watchbot
pm2 stop watchbot
mv config.json config_bup.json && git pull && mv config_bup.json config.json
npm i
pm2 start --name watchbot app.js

Releases

No releases published

Sponsor this project

Packages

No packages published