Skip to content

oscgu/faucet-bot

Repository files navigation

faucet-bot

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.

Getting started

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

Running the bot

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)

Commands

/faucet <chain> <token>

Replies

Pending Transaction:

loading

Finished Transaction:

finished

Cooldown:

cd

Out of funds:

oof

Unsupported Token:

ut

Error:

err

About

A simple faucet bot to disburse testnet funds

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published