dolphin testnet v3 faucet
deployment configuration
this application consists of several components:
discord/registration
a nodejs application which registers discord slash commands on the discord server
discord/listener
a continuously running nodejs application which listens for messages and commands from discord
note: the aws iam policy governing the listener's queue access is at: https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::684317180556:policy/testnet-v3-faucet$jsonEditor
lambda
an aws lambda endpoint which receives discord interactions (messages, commands) and places them in the processor queue
on first deployment of the lambda, aws will assign it an endpoint url. the discord application responsible for handling commands must be configured with this url in its interactions endpoint url
field. this can be set in the application configuration console at https://discord.com/developers/applications/${DISCORD_APPLICATION_ID}/information
, ie: https://discord.com/developers/applications/1054627515160854578/information.
discord/service
a systemd service configuration and installer which runs the above nodejs applications
installation
#!/usr/bin/env bash
AWS_ACCESS_KEY_ID=AKIAXXXXXXXXXXXXXXXX
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DISCORD_APPLICATION_ID=1054627515160854578
DISCORD_GUILD_ID=966219979383013426
DISCORD_BOT_TOKEN=XXXXX_DISCORD_BOT_TOKEN_XXXXX
DOLPHIN_FAUCET_MNEMONIC=this is not really the dolphin faucet mnemonic you should change it
curl -sL https://raw.githubusercontent.com/Manta-Network/testnet-v3-faucet/main/discord/service/install.sh | sudo bash -s ${AWS_ACCESS_KEY_ID} ${AWS_SECRET_ACCESS_KEY} ${DISCORD_APPLICATION_ID} ${DISCORD_GUILD_ID} ${DISCORD_BOT_TOKEN} "${DOLPHIN_FAUCET_MNEMONIC}"
debugging
the discord/service installer also installs promtail (a log forwarder) which is configured to forward the service logs to pulse. the forwarded logs can be seen here.