devlog
Minting and trading of ERC20 and ERC721 tokens over Discord.
Avaer (Adrian)#9812
jin#6455
Video link: https://www.youtube.com/watch?v=7OjEWsDeqd4
It's widely acknowledged that onboarding is the biggest friction to mass crypto adoption. Our friends in the VR community are not sure where to get started and Metamask is where they end their journey because it does a poor job of explaining how crypto or NFTs work.
Since many of the NFT curious folks are on Discord, we've created a bot that handles crypto for easy minting plus trading of ERC20 and ERC721 tokens. Here's a few examples of its functionality:
Drag and Drop Minting
Drag and drop a file into discord with the message .mint
to create a 1/1 or .mint [quantity]
to create multiple editions of a NFT.
Transferring NFTs
To transver a NFT to another player, first get the number ID of the NFT you want to send using .inventory
command. Then type .transfer @user [item number] [quantity]
.
To verify that the NFT is in your wallet, you can type .inventory
again or login the web client.
Trading
Users can trade nonfungible and fungible tokens with each other over discord. Simply type .trade @user
to initiate a trade.
Every trade is given a number since there can be simultaneous trades happening at the same time.
Users add tokens with the following commands:
.addft [trade number] [number of tokens]
.addnft [trade number] [token number ID]
After both parties put up their offer, they click the green check mark. After both click the green check, there's a second verification that happens with the double hearts. After both traders click the double hearts emoji, the bot will initiate the trade.
The NFT Discord bot runs on an Ethereum side chain and allows you to interact with the blockchain by running discord commands like .inventory
. There's no setup required, anybody who is in the Discord will already have an Ethereum address.
Full list of commands below (view by typing .help
):
.status - show your account details
.balance - show your FT balance, or that of a user/address
.inventory [@user|0xaddr]? - show your NFTs, or those of a user/address
.address [@user]? - print your address, or that of a user
.key - get your private key in a DM
- can be used to log into the app
Tokens
.send [@user|0xaddr|treasury] [amount] - send [amount] FT to user/address
.transfer [@user|0xaddr|treasury] [id] [quantity]? - send [quantity] [id] NFTs to user/addr/treasury
.preview [id] - show preview of NFT [id] in channel
.gif [id] - show animated gif of NFT [id] in channel
.get [id] [key] - get metadata key [key] for NFT [id]
.set [id] [key] [value] - set metadata key [key] to [value] for NFT [id]
Account
.name [newname] - set your name to [name] on the chain
.avatar [id] - set your avatar to [id] on the chain
Minting
.mint [count]? (in the file upload comment) - mint [count] NFTs from file upload
Packing
.peek [nftid] - check packed ft balance of [nftid]
.pack [nftid] [amount] - pack [amount] ft from yourself into [nftid]
.unpack [nftid] [amount] - unpack [amount] ft from [nftid] to yourself
Trade
.trade [@user|0xaddr] - start a trade with user/address
.addnft [tradeid] [nftid] - add nonfungible token to trade [tradeid]
.removenft [tradeid] [index] - remove nonfungible token at [index] from trade [tradeid]
.addft [tradeid] [amount] - add fungible tokens to trade [tradeid]
Store
.store [@user]? - show the treasury store, or that of a user
.sell [nftid] [price] - list [nftid] for sale at [price]
.unsell [saleid] - unlist [saleid] from the store
.buy [saleid] - buy the [saleid] from [@user]
Worlds
.createworld - create a world and print its details
.destroyworld [worldID] - destroy world with id [worldId]
Key Management (DM to bot)
.key [new mnemonic key] - set your Discord private key
.key reset - generate and set a new Discord private key
Help
.help - show this info
Anyone can send NFTs and FTs to the treasury but only certain Discord roles can actually sell from the treasury.
View server store
.store
Will display the store, which may look like this:
#1: NFT 101 (capture3.PNG) for 1000 FT
#2: NFT 102 (capture3.PNG) for 1000 FT
#3: NFT 25 (thisisepic.mp4) for 42069 FT
Buy something from server store
.buy 3
View treasury balance
.balance treasury
Send NFT to the treasury
.transfer treasury [NFTid]
Sell NFT from the treasury (NFTid must belong in the treasury already)
.sell [NFTid] [Price]
The treasury plays an important role in the community. Privileged access via Discord roles, stakeholders will be able to view the treasury and make decisions based around how to best manage their resources.
Pack and unpack fungible tokens from NFTs. Can be tradeable then on Opensea.
To-do:
.packs [@user|nftid] - check packed ft balances of [@user] or [nftid]
.pack [nftid] [amount] - pack [amount] ft from yourself into [nftid]
.unpack [nftid] [amount] - unpack [amount] ft from [nftid] to yourself
Below is an example for how you can mint and send NFT gift cards to other users in the server.
# Mint 10 copies (drag and drop file first)
.mint 10
# View inventory to verify mint and NFTids
.inventory
# Pack 50 grease per pack (manual atm)
.pack [nftid] 50
.pack [nftid] 50
.pack [nftid] 50
# Send a gift card to a friend
.transfer @user [nftid]
# Friend can unpack any amount
.unpack [nftid] 20
The bot also has a web interface (https://app.webaverse.com/ethereum.html) that supports login via:
After logging in, you'll be greeted by the UI that lets you preview whats in your sidechain and mainnet Ethereum wallet as well as your balance of fungible tokens.
The NFT Discord bot can end up as being the most scalable and frictionless on-ramp into the world of crypto and NFTs.
This bot can be useful in many other ways. For education, communities can play with NFT concepts on discord without needing to go through setting up Metamask beforehand. Transactions happen quickly on the sidechain. For virtual events, it can be as easy to create tickets and merch as it is to setup calendar reminders, helping make the behind the scenes work better and sustainable.
In order to make the bot better and maintanence sustainable, our plan is to monetize by only creating a token that's used for minting NFTs. This fee extends only to the server admin that invites the bot, while a discord role for minting/crafting of NFTs can be appointed to other people on the server. This ensures that the treasury can't be spent by day 1 people on the server and by only those that the admin and community trusts. It also creates an incentive for reduced spam and more quality supply.
There is an explorer for discovering NFTs minted by the bot via the Opensea link on the website. There can be Opensea storefronts that accept tokens as well, giving servers more options for how they want to spend and accumulate more tokens for minting. Discord is the factory, Opensea is the bazaar.
Two types of fees: paid by minter, paid from treasury (if you have crafter role)
Start with 10k liquidity, plan giveaways, and spent grease goes back to main wallet.
.store
for the server store that certain Discord roles can list to.store @user
for a user's personal storemontage *.png -tile 12x5 outdir/out.png
Create a recipe book for digital goods with short list of commands, perhaps providing some templates.
Fungible tokens can be packed one way into any NFT. This could turn any NFT into a piggy bank of sorts, perhaps useful for fundraising?
Vprod: While in VR inside VRchat with xsoverlay / ovrtoolkit, we can do a trade on Discord.
Sponsorship NFTs for the webaverse server store such as: banners, swag, and booths.
Make an NFT for a feature and list it for sale, once it's bought the feature is released. Can be useful for buying extra features for the bot?
Emoji to represent grease token: :oil:
Gift someone that comes with a private message from the bot, which can have an optional from who. This can also serve same purpose as the unlock when purchased feature on Rarible, especially if the message had spoiler tags on as well for added effect.
To-do:
Cards can serve as an awesome metaphor for collectible and composable (think power-ups) asset. One's NFT wallet in VR could literally be a card deck container. Here are some cool designs we could explore:
Hacking the CSS on Opensea to display all NFTs to look like trading cards: https://twitter.com/dankvr/status/1318470791877390337
Awesome 3D rendered card art (represents cool use of portals for preview): https://twitter.com/robbietilton/status/1318018269299625984
These cards are from the game Cross Universe, a VR card game in NeosVR: https://twitter.com/cross_english
We need a web designer to help create a beautiful inventory UI
Should be able to drop the cards into the world or drag them to other people in the UI to trade.
.wget [id] - get NFT [id] delivered in DM
Certain Discords would want confidentiality of the tokens they are trading, which is especially true with avatar trading servers.
Unlock when purchased is also useful when the actual file size of the content is bigger than the allowed file size that can be uploaded on the platform. The actual file
Currently files are hosted on S3. Once the bot hits mainnet, the bot will DM the pinned IPFS link to the file.
Matrix is an open standard for decentralizated communication that can be used to connect Discord communities together together. It does this through bridges: https://matrix.org/bridges/#discord
We've tested bridges using bots to connect Matrix together with IRC, Discord, and Mozilla Hubs. When its working they all tune into the same group chat, with messages and media transferring between them no matter which end point it was sent on.
However, one can imagine that when connecting chat platforms together the information stream could become noisy and confusing. To prevent spam, the idea of having a matrix style twitter came up so Discords can post succient messages to other Discords. In fact, Discord already has a feature like this: https://support.discord.com/hc/en-us/articles/360032008192. This feature allows for following published messages from other servers via announcements channels. The rate limit is 10 publishes per hour, and if you hit it, you'll see an error message.
Another way to prevent spam when combining Discords is an idea inspired by High Fidelity and Gather Town. Imagine various Discords that are linked together visualized like a venn diagram. Now imagine your Discord avatar as a 2D character on this map. Using this map you could type, hear, and talk to people in the servers you are currently standing around.
Interact with the bot on the Untitled NFT Hackathon discord here: https://discord.com/channels/757848010846896139/770515252465893377/770516726702014484
The theme of the hackathon was composability. NFT Discord Bot made 5th place out of 30 teams during the Untitled NFT Hack!
We also hosted a couple of virtual events in the Internet Archive reconstruction during the hackathon. In the VRChat version we gathered WebXR and Web3 developers onto the stage to discuss composability.
Questions that we discussed include…
The day after we had a virtual meetup in the same world using Mozilla Hubs with a few lightning talks.
One of the goals of the hackathon is to build a builder community of Metaverse + web3 NFT DeFi hackers. We're seeing if the NFT bot plays well with the Hubs discord bot and sesh.fyi calendar bot for building an awesome online communities together.
This hackathon has been a blast and the Discord bot is proving super useful. Join the Webaverse community and come check it out: discord.gg/9M8awV8
Ribbon cut
Mighty Minting Machine