{"id":13455845,"url":"https://github.com/milktoastlab/SolanaNFTBot","last_synced_at":"2025-03-24T09:30:48.693Z","repository":{"id":41992289,"uuid":"421809366","full_name":"milktoastlab/SolanaNFTBot","owner":"milktoastlab","description":"A helpful bot for tracking your Solana NFT project on discord channels.","archived":false,"fork":false,"pushed_at":"2022-12-15T18:24:08.000Z","size":343,"stargazers_count":249,"open_issues_count":7,"forks_count":127,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-15T06:07:21.172Z","etag":null,"topics":["discord-bot","milktoast","nft","solana"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milktoastlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-27T12:29:33.000Z","updated_at":"2025-03-04T04:54:01.000Z","dependencies_parsed_at":"2023-01-29T04:01:27.407Z","dependency_job_id":null,"html_url":"https://github.com/milktoastlab/SolanaNFTBot","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milktoastlab%2FSolanaNFTBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milktoastlab%2FSolanaNFTBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milktoastlab%2FSolanaNFTBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milktoastlab%2FSolanaNFTBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milktoastlab","download_url":"https://codeload.github.com/milktoastlab/SolanaNFTBot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244918587,"owners_count":20531686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-bot","milktoast","nft","solana"],"created_at":"2024-07-31T08:01:12.010Z","updated_at":"2025-03-24T09:30:48.671Z","avatar_url":"https://github.com/milktoastlab.png","language":"TypeScript","funding_links":[],"categories":["🤖 NFT Marketplace Bots","TypeScript"],"sub_categories":["Rarity"],"readme":"# Solana NFT Bot\n\nSolana NFT bot is a helpful bot for your Solana NFT projects.\n\n## Sponsor\nThis project is proudly sponsored by [milktoast.world](https://milktoast.world):\nAn NFT project that aims to spread happiness and cheer. \n\n\u003cimg src=\"https://user-images.githubusercontent.com/90617759/139604005-addc968d-2193-4e7b-9ac9-86622672391b.png\" width=100\u003e\n\nIf you find this project useful, please support us by following [Milktoast](https://twitter.com/milktoastnft) and [KryptoJ](https://twitter.com/kryptoj_) on Twitter!  \n\n\n## Features\n- [x] Notify discord channel on each purchase in marketplaces. \n- [x] Send Twitter tweet on each purchase in marketplaces. (Experimental)\n- [x] [Support major marketplaces](#marketplace-support) \n\n\u003cimg width=\"400\" alt=\"Screen Shot 2022-01-30 at 10 34 53 pm\" src=\"https://user-images.githubusercontent.com/90617759/151699155-3cb01555-da85-47dd-ad10-2a9dd97eb360.png\"\u003e\n\n## Running using docker\n\n### Requirement\n* [Docker](https://www.docker.com/products/docker-desktop) \u003e= v20.10\n  * If you're new to Docker, we recommend going through their [get started page](https://docs.docker.com/get-started/) to gain a basic understanding of Docker before moving forward.\n* A Solana RPC node/server - This is needed so the bot know where to call to fetch solana transactions.\nHere are some potential routes to get a node:\n  * https://quicknode.com/\n  * [Run your own](https://medium.com/@MisterKevin_js/how-to-run-your-own-solana-rpc-endpoint-on-figments-datahub-e9ca881bebb7)\n\n\n\n### Instructions\n\n#### Run bot locally using docker in the terminal\n\nIf you're new to docker, before starting I recommend \n\nRun the following command with your own secrets replaced with your own configuration:\n\n```\ndocker run --name nftbot -d -p 4000:4000 -e SOLANA_RPC=YOURRPCURL -e DISCORD_BOT_TOKEN=YOURDISCORDTOKEN -e SUBSCRIPTION_DISCORD_CHANNEL_ID=YOURCHANNELID -e SUBSCRIPTION_MINT_ADDRESS=YOURMINTADDRESS milktoastlab/solananftbot\n```\nNote: The command above is tested in linux/unix env only. You may have a different experience in Windows.\nPlease check the [documentation on how to run docker command in windows](https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/run-your-first-container) if you need any help.\n\nView logs\n```\ndocker logs ntfbot\n```\n\nTo make sure the bot is working properly, use [/test-sale-tx](src/server.ts#L47) endpoint\n```\ncurl \"http://localhost:4000/test-sale-tx?signature={sale_transaction_signature}\u0026channelId={discord_channel_id}\"\n```\n\nIn case of *DiscordAPIError: Missing Access* error, check if the bot has been invited to the channel. Go to the channel, click \"Add members or roles\" and add your bot account as a member.\n\n\nAlternatively, you can run it using docker-compose:\n\nUpdate `.env` with your secret and run\n```\ndocker-compose up -d bot\n```\n\nSee [here](#configurable-environments) for more details on environment variables\n\nView logs\n```\ndocker-compose logs bot\n```\n\n## Running in development\n### Requirement\n* Node \u003e= 16.6\n* Yarn\n\n### Instructions\n\n#### 1. Install dependencies\n```\nyarn install\n```\n\n#### 2. Update .env with your secrets\n\nFollow the instructions [here](#configurable-environments)\n\n#### 3. Run the server\n```\nyarn dev\n```\n\n## Configurable environments\n\nHere are a list of environments you need to configure before running the NFT bot.\n\n```sh\n# RPC node url\nSOLANA_RPC=\n# Discord bot secret\nDISCORD_BOT_TOKEN=\n# The discord channel to notify\nSUBSCRIPTION_DISCORD_CHANNEL_ID=\n# Mint address to watch for sales\nSUBSCRIPTION_MINT_ADDRESS=\n# Twitter secrets\nTWITTER_API_KEY=\nTWITTER_API_KEY_SECRET=\nTWITTER_ACCESS_TOKEN=\nTWITTER_ACCESS_TOKEN_SECRET=\n# Magic eden API\nMAGIC_EDEN_URL=https://api-mainnet.magiceden.dev/v2\n# Enter the NFT collection that you want to track\nMAGIC_EDEN_COLLECTION=\n# The discord channel to notify\nMAGIC_EDEN_DISCORD_CHANNEL_ID=\n```\nhttps://github.com/milktoastlab/SolanaNFTBot/blob/main/.env\n\n### Variable breakdowns\n\n#### DISCORD_BOT_TOKEN\nThis is your discord bot secret.\nIf you don't have a discord bot yet, you can create one following the instructions here:\nhttps://discordpy.readthedocs.io/en/stable/discord.html\n\nMake sure your bot has the required permissions:\n* View channels\n* Read/Send messages\n* Send messages\n* Embed links\n\n\u003cimg width=\"827\" alt=\"Screen Shot 2021-10-31 at 9 25 31 am\" src=\"https://user-images.githubusercontent.com/90617759/139560537-e0420217-25d7-4538-81cc-d53422c24db9.png\"\u003e\n\n#### SUBSCRIPTION_DISCORD_CHANNEL_ID\nThis is the ID of the discord channel you want to send notifications to.\nYou will need to enable developer mode have access the channel IDs.\nHere are the instructions:\nhttps://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-\n\n#### SUBSCRIPTION_MINT_ADDRESS\nThis is the address that you want the Solana NFT bot to watch for notifications.\nIt needs to be one of the creator addresses:\n\u003cimg width=\"324\" alt=\"Screen Shot 2021-11-12 at 6 16 31 pm\" src=\"https://user-images.githubusercontent.com/90617759/141426468-fcf7c522-4480-4a4e-b1e9-c0cbed3f4f10.png\"\u003e\n\n_Note: Avoid personal addresses because it could detect unwanted sales._\n\n##### Watch multiple addresses\nYou can watch multiple addresses at once by using a comma between addresses:\n```bash\nSUBSCRIPTION_MINT_ADDRESS=add123,add1235\n```\nThis feature reduces the need to run multiple containers in production.\n\n#### Twitter variables\n\n__Experimental:__\nWe haven't stress test Twitter notification on high volume projects. We recommend you have a good internet connection for your bot if you want to use this feature, because for each notification, the bot will upload the nft image to Twitter for display. \nCreate a Github issue to let us know if you encounter any problems.\n\n\nTo post sales notification tweets to Twitter via the API, you will first need Elevated access to the Twitter API.\n\n\u003cimg src= https://user-images.githubusercontent.com/50549441/149970878-fc94fb39-8147-4163-a17e-f0552b8e71cc.png\u003e\n\nWhile logged in to the account you want to use the Twitter API for, apply for Elevated access to the twitter API by clicking the link here and following the steps: \nhttps://developer.twitter.com/en/portal/petition/essential/basic-info\n\nThe approval process may take a while. \n\nCreate a new project, and create a new App under that project.\n\nThe API Key and secret will be displayed to you there, which you'll assign to `TWITTER_API_KEY` and `TWITTER_API_KEY_SECRET` respectively.\n\nThen, click on the Keys and tokens tab, and generate the Access Token and Secret. Assign these to `TWITTER_ACCESS_TOKEN` and `TWITTER_ACCESS_TOKEN_SECRET` respectively.\n\n\u003cimg src= https://user-images.githubusercontent.com/50549441/149973388-58f3a303-91f4-4e1b-ab7f-dfc2a22aa5da.png\u003e\n\n### Magic Eden variables\nMagic eden's NFT trading program has changed to V2, which means the old way of detecting sales won't work anymore. We have updated the bot to use the new API to detect sales.  \nTo enable this feature, you will need to add the following variables to your `.env` file:\n\n__MAGIC_EDEN_COLLECTION__ \n\nThis is the collection key to magic eden. To find our what it is, navigate to the collection page and look at the url. It should be the last part of the url.\n```\nExample:\nhttps://magiceden.io/marketplace/milktoast\n```\nThe collection key is \"milktoast\"\n\n__MAGIC_EDEN_DISCORD_CHANNEL_ID__\n\nThis is the discord channel to notify. Same as `SUBSCRIPTION_DISCORD_CHANNEL_ID` but it doesn't support multiple channels at the moment.\n\n\n## Production deployment\n\nThe solana nft bot is containerized, you can deploy it on any hosting service that supports docker. \n\nHere are some options: \n\n* [Akash Network](https://akash.network), a decentralized cloud compute marketplace. [Click here for the step by step guide.](https://medium.com/@kryptoj/how-to-host-a-solana-nft-bot-on-the-akash-network-no-code-ccbeb9ce35d1)\n* https://www.ibm.com/cloud/code-engine\n* [Digital Ocean](https://www.digitalocean.com/products/droplets)\n\n## Marketplace support\n\n- [x] [Magic Eden](https://magiceden.io/)\n- [x] [Solanart](http://solanart.io/)\n- [x] [Digital Eyes](https://digitaleyes.market/)\n- [x] [Alpha Art](https://alpha.art/)\n- [x] [Exchange Art](https://exchange.art/)\n- [x] [Solsea](https://solsea.io/)\n- [x] [OpenSea](https://opensea.io/)\n\n### Adding new marketplace\n\nSolanaNFTBot aim to support as many marketplaces are possible. \nHere is the instruction on how you can add support to other marketplaces.\n\n#### 1. Add a new marketplace config\nUse `src/lib/marketplaces/solsea.ts` as example\n\n#### 2. Write a test for the marketplace\nUse `src/lib/marketplaces/solsea.test.ts` as example\n\n#### 3. Add the new marketplace to the existing list \n`src/lib/marketplaces/marketplaces.ts`\n\n## Support\n\nIf you have any questions or feedback, feel free to jump into our discord #dev-talk channel and have a chat.\nhttps://discord.com/invite/GYxur2tvzP\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilktoastlab%2FSolanaNFTBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilktoastlab%2FSolanaNFTBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilktoastlab%2FSolanaNFTBot/lists"}