This is a Discord bot that dispenses Goerli State token.
- Npm
- Node.js
-
Register an application and get a token from here
-
Rename the
.env.examplefile to.env -
Add the bot token, Alchemy URL, wallet keys, and the guild/client IDs to the
.envfile Note: The client ID is the application ID of the bot. You can get this from the application page or by right-clicking the bot and selecting "Copy ID". The guild ID is the ID of the server you want the bot to be in. You can get this by right-clicking the server and selecting "Copy ID". -
Install with
npm install- Run
node deploy-commands.jsto register your slash commands. Note: Deploy is at guild level by default. You can change this by updating thedeploy-commands.jsfile.
- Start the bot with
node .
# or with PM2 (recommended)
npm install -g pm2
pm2 start index.js I highly recommend a process manager such as PM2 or forever to make sure the bot stays up.
- Use
/faucet <address>to request funds.
You can change the following in the .env file:
database_uri: mysql database uri, for example: mysql://username:password@host:port/dbnamefaucet_private_key: Private key of faucet accountfaucet_public_key: Public key of faucet accounterc20_token_amount_in_wei: amount of State token to send Per request in wei uniterc20_address: State token contract addressblockchain_rpc: RPC Provider URL of goerli Testnet Network
