cosmos-discord-faucet
A Discord bot for dispensing testnet tokens.
Requirements
- python3.8+
- gaia v6.0.0+
- Faucet keys in gaia keyring
Installation
- Install dependencies:
cosmos-discord-faucet$ python -m venv .env
cosmos-discord-faucet$ source .env/bin/activate
cosmos-discord-faucet$ pip install -r requirements.txt
- Create Discord token and save its token.
- Add the bot token to
config.ini
. - Modify the nodes, faucet addresses, and amount to send in
config.ini
.
Usage
This bot can be run stand-alone (mostly for testing), or as a service.
Stand-alone
python cosmos_discord_faucet.py
- This can be run inside a
tmux
session.
Service
- Modify the
cosmos-discord-faucet.service
file as appropriate. - Make a copy of
cosmos-discord-faucet.service
or create a link to it in/etc/systemd/system/
. - Enable and start the service:
systemctl daemon-reload
systemctl enable cosmos-discord-faucet.service
systemctl start cosmos-discord-faucet.service
systemctl status cosmos-discord-faucet.service
Discord Commands
- Request tokens through the faucet:
$request [cosmos address] vega|theta
- A ✅ means the transaction was successful
-
Request the faucet and node status:
$faucet_status vega|theta
-
Request the faucet address:
$faucet_address vega|theta
-
Request information for a specific transaction:
$tx_info [transaction hash ID] vega|theta
-
Request the address balance:
$balance [cosmos address] vega|theta
Acknowledgements
This repo is based on cosmos-discord-faucet:
- The cosmospy library calls have been replaced by calls to
gaiad
to avoid deprecated endpoints and messages. - The address prefix has been switched to
cosmos
.