ENFT is a GitHub TypeScript library that notifies you on Discord and Twitter of a collection's NFT sales.
When running this library locally, you will receive Discord notifications. However, when you deploy to AWS ECS, you will not receive Discord notifications (without any errors).
Determine why this is, fix it, and you will earn $500 (500 USDC).
docker build -t sales-bot-test:latest .
you will need also an .env
file with collection's address whose sales you want to track (go to blur, sort by 15 minute volume and pick something that sells often), alchemy api key (get one here), and discord webhook url (create a discord channel and get the webhook url, tutorial here, and finally an etherscan api key.
now run
docker run -it --env-file .env sales-bot-test:latest
discord notifications should be coming in with new sales
Make sure you have terraform installed.
Creates a "salesbot" S3 bucket in us-east-1
.
Hardcode the .env
contents into index.js
so that you have an easier life deploying this.
Build and push the new image to ECR or docker hub.
In config.tf
you need to fill out two places with your aws profile name.
In ecs.tf
you need to specify the image uri to the image you have just built. I use ECR arn uri here.
Now deploy with terraform apply
. Go to cloudwatch and see that there are no errors, and the bot isn't posting any sales to Discord. Figure out why and fix it.