Code Monkey home page Code Monkey logo

server's Introduction


logo GRAPE

GRAPE ACCESS

SPL Token gated communities on Discord

Connecting members social accounts to unique cryptographic keys is the core of our Dynamic Balance-Based Membership solution.

Prerequisites

  1. Must have an existing Discord server with at least a blank channel (Read-only channel).
  2. Invite the bot to your server using the following link: https://discord.com/oauth2/authorize?client_id=<YOUR_APPLICATION_CLIENT_ID>&scope=bot (replace YOUR_APPLICATION_CLIENT_ID with your respective application client ID from Discord).
  3. Upload 4 customs server emojis, and create appropriate roles for assigning to users (reacting with emojis).

Currently we are using the following emoji - role pairs:

// Uploaded server Emojis
  const emojis = {
      walletv2: 'Verified Wallet',
      medianetwork: 'MEDIA Holder',
      mercurial: 'Mercurial Holder',
      samo: 'SAMO Holder',
  };

Input the ID of you're read-only welcome channel in /modules/discord-bot/discord/role-claim.js file.

export default (client) => {
  // Read from Channel
  const channelId = 'Paste read-only channel ID';

  const getEmoji = (emojiName) => client.emojis.cache.find((emoji) => emoji.name === emojiName);
  1. Install PostgresSQL.
  2. Rename the .env.example file to .env and fill in the following variables:
NODE_ENV = dev

API_PORT = 5000

#DATABASE
DB_USER = graperoot
DB_HOST = postgres
DB_PASSWORD = elephant
DB_NAME = grape
DB_PORT = 5432

#POSTGRES DOCKER
POSTGRES_PASSWORD =
POSTGRES_DB = #should be same as DB_NAME

#PG ADMIN (OPTIONAL)
PGADMIN_DEFAULT_EMAIL = [email protected]
PGADMIN_DEFAULT_PASSWORD = 123456
PG_ADMIN_PORT = 5050

#NGINX
NGINX_ENVSUBST_TEMPLATE_SUFFIX = .conf

CLIENT_URL = http://localhost/ # where client is being served from (e.g localhost)

DISCORD_OAUTH_REDIRECT_URL = http://localhost/api/discord/callback # Discord callback endpoint
DISCORD_OAUTH_CLIENT_ID = # Get from Discord
DISCORD_OAUTH_SECRET =  # Get from Discord
DISCORD_BOT_TOKEN = # Get from Discord
DISCORD_BOT_ID = # Get from Discord

ETH_RPC_URL = # https://mainnet.infura.io/v3/<INFURA.IO_API_KEY>

DISCORD_CHANNEL_ID = 

DISCORD_ROLE_1 =Verified Wallet 
DISCORD_ROLE_2 =MEDIA Holder 
DISCORD_ROLE_3 =Mercurial Holder 
DISCORD_ROLE_4 =SAMO Holder

MINT_TOKEN_1 =ETAtLmCmsoiEEKfNrHKJ2kYy3MoABhU6NQvpSfij5tDs 
MINT_TOKEN_2 =MERt85fc5boKw3BW1eYdxonEuJNvXbiMbs6hvheau5K
MINT_TOKEN_3 =7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU 

MINT_MIN_BALANCE_1 =0.099
MINT_MIN_BALANCE_2 =9.99
MINT_MIN_BALANCE_3 =9999.99

  1. Clone ane deploy client from this repository: https://github.com/The-Great-Ape/client

Deployment

  • Clone this repository.
  • Install dependencies using: npm install
  • Start up server using: npm start
  • Start up Discord bot using npm run bot

Features

  • Validate Solana wallet ownership.
  • Validate Discordid ownership.
  • Creates a link between the validated discord id and validated Wallet.
  • Allows token balance rules to obtain roles on Discord and gate channel access based on ownership.

Acknowledgements

  • This project uses Solana. A fast, secure, and censorship resistant blockchain providing the open infrastructure required for global adoption.
  • This project uses Discord. A VoIP, instant messaging and digital distribution platform designed for creating communities.
  • The project uses parts of Solbot by Paul Schaaf, a tipping bot for Solana.
  • This project uses Project Serum's markets. An ecosystem that brings unprecedented speed and low transaction costs to decentralized finance.
  • This project uses noble-ed25519. Fastest JS implementation of ed25519, an elliptic curve that could be used for asymmetric encryption and EDDSA signature scheme.
  • This project uses Serum Price API by Sonar

If you are having difficulty with this application please contact BillysDiscord#5191 or DeanMachine#9058 or GintoniQ#3987 on Discord for assistance and access to a live working Demo.

server's People

Contributors

everythingspirals avatar grapemaster avatar hrk44 avatar b4ba avatar jbarratt77 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.