StellarEntry - Bringing Stellar NFTs into the digital community economy
StellarEntry allows community owners to leverage NFTs on the Stellar network:
- to monetize their community with a new revenue stream
- verify members with ownership of an NFT (keeping out pesky spammers!)
- pave the way for rewarding genuine community engagement (e.g. distribute assets and tokens to the best community members to reward them for engagement)
In this hackathon, I built a Discord membership platform powered by Stellar NFTs as a proof of concept for the NFT Wizard challenge.
How it works
- A user joins the community Discord (You can join my test discord here: https://discord.gg/UM2FRMJV2d) in order to access premium content / engage with community
- They need to purchase an NFT, mintable through the web app
- After a succesful mint, they verify their ownership of the NFT and are provisioned access to the #nft-holders channel
- Setup your own discord server, create a new channel (e.g.
#nft-holders) and a new role called
NFT Holder. Grant access to the channel for this new role.
- Create a new Discord bot (tutorial added to bottom of this readme), add bot, add "Administrator" permissions and replace L57 token in
discordbot/main.py. In Discord, ensure your bot's role is the top-most to prevent any issues
discordbot/, using Python3+, install requirements
pip install -r requirements.txtand run the bot
python main.py. You can test if the bot is functional by simply typing
$verifyin the Discord and asserting you receive an error message
- Now, install Meteor (from https://www.meteor.com/developers/install), then, inside
npm install npm start
- The webapp should now be running on port 3000. The webapp will self-generate a server/issuer account for the NFT and the user account, which you can test mint when visiting http://localhost:3000/
- Mint the NFT successfully, and go back to discord to verify ownership with the StellarEntry bot:
$verify [XLM public key]replacing the public key with the app-given one.
- Assert you have been promoted on Discord and now have access to the previously restricted channel.
StellarEntry is built on a MeteorJS (NodeJS) web application. Python is used to create the Discord NFT verification bot. Stellar SDK is the primary library used to connect with Stellar blockchain.
For this hackathon, the purpose was to engineer a proof of concept in 48 hours. Due to limited time, security was not considered in the design, with plaintext key generation and transmission over the wire. Additionally, the discord bot can be expanded to verify identity (e.g. through signing a transaction/string) before provisioning access.
Creating a Discord bot tutorial (from freecodecamp)
- Make sure you’re logged on to the Discord website. https://discord.com/
- Navigate to the application page. https://discord.com/developers/applications
- Click on the “New Application” button.
- Give the application a name and click “Create”.
- Go to the “Bot” tab and then click “Add Bot”. You will have to confirm by clicking "Yes, do it!"
- Keep the default settings for Public Bot (checked) and Require OAuth2 Code Grant (unchecked).
- Copy the bot token
To invite the bot to your Discord server:
- Go to the "OAuth2" tab. Then select "bot" under the "scopes" section. Ensure to give administrator permissions.
- After selecting the appropriate permissions, click the 'copy' button above the permissions. That will copy a URL which can be used to add the bot to a server. Paste the URL into your browser, choose a server to invite the bot to, and click “Authorize”.
Log in or sign up for Devpost to join the conversation.