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.
- 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
After installation, you control the bot in secure ADAMANT Messenger chat directly.
Available commands: ask a bot with /help
command.
- Ubuntu 16, 18 or 20 (we didn't test others)
- NodeJS v 10+
- MongoDB (installation instructions)
su - adamant
git clone https://github.com/Adamant-im/adamant-watchbot
cd ./adamant-watchbot
npm i
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, obligatorilyinfoservice
<string, array> List of ADAMANT InfoServices for catching exchange rates, recommendedslack
<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 serverbot_name
Bot's name for notificationswelcome_string
How to reply user in-chat, if unknown command received
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
crontab -e
Add string:
@reboot cd /home/adamant/adamant-watchbot && pm2 start --name watchbot app.js
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