A proof-of-ownership Discord bot for SNIP-721 tokens on the Secret Network. Verified owners are given specified roles.

Overview

SNIP-721 Proof-of-Ownership Discord Bot

A proof-of-ownership Discord bot for SNIP-721 tokens on the Secret Network. Verified owners are given specified roles. In addition, there is a cron script included which will continuously check ownership of all the holders and remove users that no longer hold any tokens.

Requirements

  1. MongoDB (recommend Atlas)
  2. Discord bot token
  3. Discord Server ID
  4. Discord Role ID

Back-end Instructions

  • Edit the .env file in the backend directory.
  • Fill in the details for your Discord server ID, role ID and token at the top.
  • Fill in the contract address and code hash for your SNIP-721 contract.
  • Create a new wallet, fund it with some SCRT for gas and input the mnemonic inside the .env file.
  • Enter your Mongo DB details at the bottom of the file.

Next, we will generate a viewing key. Open your terminal, head to the backend directory and enter:

yarn run --set-viewing-key

This will output a viewing key, save this to the .env file.

Next, we will generate an encryption key that will be used for encrypting the secret address and discord ID's saved in the database.

yarn run --create-encryption-key

Copy the encryption key from the output and save it in the .env file.

Now, you are ready to start the bot! Note: The bot will run on port 4000, you can change this in bot.js if you need.

Start the bot:

node bot.js

To start the cron job:

node cron.js

Note: The cron job is set to run every 1 minute. The purpose of a short duration is for testing. You can increase the duration in cron.js when you put in production.

Front-end Instructions

  • Edit the config.js file in the frontend directory
  • Fill in the details for your SNIP-721 contract
  • Fill in the Secret address for the new wallet you created to use with the backend
  • Finally, you will need to include the URL for the backend API running on port 4000

Now you are ready to deploy the website! Save the config file, build and deploy to your web server.

You might also like...

When new tokens gets listed on a DEX, bots are able to detect this and be one of the first to buy the token for a low price. This is an example of such bot.

When new tokens gets listed on a DEX, bots are able to detect this and be one of the first to buy the token for a low price. This is an example of such bot.

Listing Sniping Bot When a new token gets listed on a DEX, bots are able to detect the PairCreated event emitted from the DEX's factory contract. This

Dec 21, 2022

A simple & easy2use API for obtaining information about a discord user, discord bot or discord guild and their use for some purpose on websites!

discord-web-api A simple & easy2use API for obtaining information about a discord user, discord bot or discord guild and their use for some purpose on

Jun 28, 2022

Discord Neura - a Discord bot framework built on discord.js

Discord Neura Description Discord Neura is a Discord bot framework built on discord.js. Features Command Handler, Arguments, Preconditions and Listene

Mar 23, 2022

A discord bot made using discord.js and discord-player

A discord bot made using discord.js and discord-player

Musx A custom discord bot that can play music in your server 🎯 Add the bot to your server If you are looking for a music bot for your Discord server

Mar 28, 2022

This bot is a cool Discord bot made in discord.js using Node.JS

This bot is a cool Discord bot made in discord.js using Node.JS

Anti-Crosspost Discord Bot This bot is a cool Discord bot made in discord.js using Node.JS. It detects when a user cross-posts a message in multiple c

May 31, 2022

Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot that handles all your server needs.

Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot that handles all your server needs.

Welcome to Co-Pilot Bot repo! 👋 🤖 Co-Pilot (All-in-one Discord Bot) Co-Pilot is a discord Bot designed to be the all-in-one, open-source Discord bot

Nov 11, 2022

It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

Lofi-Radio-Music-Bot It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with butt

Jan 2, 2023

New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

Installation • Thanks to • Donate Official Group Bot • Settings Instalasi Heroku Buildpack Click the deploy icon below ! heroku/nodejs https://g

Feb 9, 2022

This package will generate n numbers of thumbnails at different position in a given video file.

This package will generate n numbers of thumbnails at different position in a given video file.

About Generate n numbers of Image thumbnails of a video file. !Live Demo code sandbox example video-thumbnail-generate.mp4 This package can be used wi

Dec 20, 2022
Comments
  • suggestion to eliminate the need of the BE doing a tx to set the viewing key

    suggestion to eliminate the need of the BE doing a tx to set the viewing key

    Great job! Just thought I'd leave a suggestion in case you have time to explore it.

    Since a permit is just a JSON string (where the object fields are in a mandatory order), the secp256k1 public key, and the secp256k1 signature of that JSON signed by the secp256k1 private key corresponding to the public key in the permit, you can actually create a permit without needing keplr. So you could avoid the need for the BE to do a tx to create a viewing key.

    Besides eliminating the need for gas, that also means that if you wanted to make it usable for any number of collections, you can just either create new, individual permits, or just create a new single permit that is good for all the collections without needing to set a key with every one.

    opened by baedrik 1
Owner
Kevin K
Exploring the Cosmos
Kevin K
Colour me! is a simple Discord bot running on Cloudflare Workers that allows server admins to give users the ability to change the colour of their own assigned colour roles!

Colour me! Colour me! is a simple Discord bot that allows server admins to give users the ability to change the colour of their own assigned colour ro

Erisa A 15 Dec 24, 2022
A decentralized Music Ownership System developed on Truffle Suite and React Bootstrap to allow Music artists to upload their content to the blockchain, that can be streamed by users

A decentralized Music Ownership System developed on Truffle Suite and React Bootstrap to allow Music artists to upload their content to the blockchain, that can be streamed by users.

M. Adil Fayyaz 10 Sep 5, 2022
A bot to manage a whole game jam/hackathon server from a fully functional pollsystem to managing color roles.

Jambo This bot is made to autonomously manage a discord server with regular game jams/hackathons. It will collect the proposals for the jam, create po

null 10 Nov 3, 2022
A bot to manage a whole game jam/hackathon server from a fully functional pollsystem to managing color roles.

Jambo This bot is made to autonomously manage a discord server with regular game jams/hackathons and make it a plasent and happy enviroment. It will c

null 10 Apr 7, 2022
Wick Discord scam bot that uses a QR Code logger to grab Discord tokens

Wick Discord scam bot that uses a QR Code logger to grab Discord tokens. DOESN'T USE CHROME WEB DRIVER

ulnk 81 Jan 7, 2023
Discord-Bot - You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have published on my youtube channel.

Discord-Bot You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have publishe

Umut Bayraktar 114 Jan 3, 2023
A multipurpose bot, a clan bot, a all in one bot. The one bot u need for ur server originally made as Milrato discord Bot and by Tomato6966.

Public Bot and Support Server! Invite the Public Version of this Bot so you don't need to host it by yourself or join my Discord server to get a custo

Tomato6966 472 Dec 25, 2022
Sharing the latest stellar Super Mario 64 runs verified on speedrun.com.

SM64-twitter-bot Sharing the latest stellar Super Mario 64 runs verified on speedrun.com. https://twitter.com/SuperMario64Bot Requirements You will ne

hippolyte 4 Jul 14, 2022
Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total contributions.

Remoklify - Gitlift Discord Bot Gitlift Discord Bot is a discord bot which is listening Discord Messages to reply with user gitlift profile and total

Remoklify 3 Mar 20, 2022
About Discord bot draft that does not contain ready-made commands, compatible with discord.js v14. Create your own discord bot with this command handler.

discordJS-V14 About Discord bot draft that does not contain ready-made commands, compatible with discord.js v14. Create your own discord bot with this

Umut Bayraktar 36 Dec 28, 2022