A small bot which you can use for your discord to send out testnet funds.
You can set a time restriction for each token in src/config.ts
.
Currently only chain native and erc20 tokens are supported.
run yarn
to build
Create a .env
file with the following lines:
POSTGRES_HOST=
POSTGRES_USERNAME=
POSTGRES_PASSWORD=
POSTGRES_DB=
PRIVATE_KEY=
ALCHEMY_API_KEY=
BOT_TOKEN=
BOT_ID=
GUILD_ID=
ADDRESS=
The receiver address is currently hardcoded, but you can plug this into your existing backend by editing
backend/getAddresssOfUser.ts
. It passes the discord user id to it.
Register the slash commands with: yarn ts-node registerCommands.ts
With configured-db (requires docker(-compose) and .env
file):
docker-compose up
The bot currently drops and creates tables again after every restart (can be disabled in index.ts@21 by setting force to false)
/faucet <chain> <token>
Pending Transaction:
Finished Transaction:
Cooldown:
Out of funds:
Unsupported Token:
Error: